- Node.js 18.17.0
- Express 4.18.2
- Genesys Cloud API v2
- Region: us-east-1
- Timezone: America/Chicago
Trying to understand why my Express middleware is receiving a 403 Forbidden response when attempting to fetch queue details via the API. I have successfully implemented the OAuth 2.0 client credentials flow and am receiving a valid access token. The token introspection endpoint confirms the token is active and valid.
However, when I make the following GET request:
const options = {
method: 'GET',
url: 'https://api.mypurecloud.com/api/v2/routing/queues',
headers: {
Authorization: `Bearer ${accessToken}`,
'Content-Type': 'application/json'
}
};
try {
const response = await axios.request(options);
console.log(response.data);
} catch (error) {
console.error('Error fetching queues:', error.response.status, error.response.data);
}
The error response is:
{
"errors": [
{
"code": "forbidden",
"message": "You do not have the required permissions to perform this operation."
}
]
}
I have assigned the following scopes to the application in the Genesys Cloud admin portal:
routing:queue:readrouting:queue:writerouting:skill:readrouting:member:read
I also verified that the user associated with the client credentials has the “Routing Manager” role, which should grant access to these resources. Interestingly, other endpoints like /api/v2/users/me work fine with the same token, provided I have user:read scope.
Is there a hidden scope requirement for listing queues? Or is this a known issue with the routing:queue:read scope not propagating correctly to the API gateway? I’ve tried regenerating the client secret and re-authorizing, but the result is identical. Any insights on what I might be missing here?