Listing OAuth clients via API to audit scopes

Need to build a script to audit our OAuth clients. The goal is to list all clients and check their scope assignments.

Tried calling GET /api/v2/oauth/clients. The docs say it returns a list, but I’m getting a 403 Forbidden.

Using the REST Proxy in a script. Set the Authorization header to Bearer . The token is valid. I can call GET /api/v2/users/me with the same token.

The response is just:
{
“errors”: [
{
“code”: “forbidden”,
“message”: “You do not have permission to perform this action”
}
]
}

Checked the scopes on the integration. It has admin:oauth and view:oauth. Should be enough.

Is there a specific admin scope needed? Or is the endpoint different for listing clients?

Also tried POST /api/v2/oauth/clients/search with an empty query. Same 403.

Any ideas? The script is stuck here. Can’t proceed with the scope check logic.

The GET /api/v2/oauth/clients endpoint requires specific administrative scopes that your current token likely lacks. The view:user or view:organization scopes aren’t enough here. You need admin:oauthclient or view:oauthclient depending on whether you’re modifying or just reading.

Check your token’s scope list. If you’re generating the token via a service account, ensure the service account has the “View OAuth clients” permission in the Genesys Cloud admin UI under Settings > Security.

Here is a quick curl command to verify your token’s scopes before hitting the endpoint:

curl -X GET "https://api.mypurecloud.com/api/v2/oauth/tokeninfo" \
 -H "Authorization: Bearer YOUR_TOKEN"

Look for admin:oauthclient in the scope array. If it’s missing, you’ll get that 403. Also, ensure the service account isn’t restricted to a specific organization if you’re in a multi-tenant setup. The endpoint respects org boundaries.

If you still get 403 after verifying scopes, check if the service account is locked or disabled.