Trying to pull queue stats for adherence checks. Used Postman to get a token with view:routing:queue scope. Seems right, right? But hitting GET /api/v2/routing/queues gives me a 403.
403 Forbidden
{ "code": "forbidden", "message": "User does not have permission to perform requested operation" }
Checked the org roles, user is a super admin. Am I missing a specific OAuth scope? Feels like view:routing:queue should cover it.
Check the scope name again. It’s likely a typo or missing part. The correct scope for reading queue details is view:routing:queue. Wait, you said you used that. Okay, let’s look closer.
If the user is a Super Admin, permissions shouldn’t be the issue. The problem is usually how the token is generated or which org you’re hitting.
- Make sure the
client_id used to get the token belongs to the same org as the API request.
- The scope
view:routing:queue allows viewing queue definitions, not necessarily stats. For stats, you need view:analytics:conversation or view:analytics:interaction.
Here is a quick curl to verify the token scopes:
curl -X GET "https://api.mypurecloud.com/api/v2/oauth/tokens" \
-H "Authorization: Bearer YOUR_ACCESS_TOKEN" \
-H "Content-Type: application/json"
Look at the scope array in the response. If view:routing:queue is there, try hitting a specific queue ID instead of listing all queues. Sometimes listing all queues requires additional permissions depending on the org setup.
Also, check the timestamp on the token. Tokens expire. If the token is old, it might be rejected even if scopes are right.
If you’re still stuck, try this endpoint instead for adherence:
GET /api/v2/analytics/queues/realtime?queueIds=QUEUE_ID
This often works better for real-time adherence checks. Let me know what the token scope check returns.