The digital queue metrics drop to zero every Tuesday. Vendor support says the /api/v2/engagements endpoint throws a 401 Unauthorized error after token refresh. Management doesn’t want the CRM to miss chat data. How do I change the OAuth scope setting in the admin panel so the sync stops failing? Agents can’t process transfers while it retries. Doing jack all during the shift. Logs show the exact timestamp mismatch.
Check your application’s OAuth scopes in the Genesys Cloud Admin UI. The 401 error usually happens when the token doesn’t include the specific engagement read scope. You don’t need to change the token refresh logic if the initial grant was correct. Go to Admin > Apps & Integrations, find your app, and ensure engagement:read is selected. If you’re building the token request manually, make sure the scope parameter is space-separated. Missing that one scope breaks the entire sync. Here is the minimal cURL to verify the scope is active on a fresh token:
curl -X POST https://api.mypurecloud.com/api/v2/oauth/token \
-H "Content-Type: application/x-www-form-urlencoded" \
-d "grant_type=client_credentials&client_id=YOUR_CLIENT_ID&client_secret=YOUR_CLIENT_SECRET&scope=engagement:read"
Verify the scope field in the JSON response contains engagement:read. If it’s missing, the API will reject the engagement calls.