Problem
We’re pulling queue layout configurations for the dashboard team. Production throws a hard stop when hitting the routing queues path. The script runs fine in the dev sandbox.
Code
import requests
headers = {'Authorization': f'Bearer {token}', 'Content-Type': 'application/json'}
resp = requests.get('https://api.mypurecloud.com/api/v2/routing/queues', headers=headers)
Error
Returns 403 Forbidden. We’re running Python 3.11 with requests 2.31. The payload says {'code':'bad_request','message':'Access denied. Check your OAuth scopes.'}. We’ve verified the token is valid in us-east-1. The app registration has routing:read attached, but it still drops the call.
Question
Which exact scope handles this endpoint? The docs mention routing:write for mutations. We only need layout stats. Tried adding routing:queue:read and analytics:read without luck. Token refresh logic is working fine. It’s strictly a permission mismatch. Honestly, the UI shows the queues perfectly fine. The user role is correct. Just the API call is failing.