Genesys Cloud API: List OAuth clients and check scopes

I’m writing a script to audit OAuth clients in our org. I need to list all clients and check their scope assignments programmatically.

I tried GET /api/v2/oauth/clients but the response doesn’t include the scopes. I expected a scopes array in the JSON payload. Is there another endpoint or a specific header I’m missing?

Using the Python SDK, platform.oauth_clients.get_oauth_clients() returns the same limited data. Any tips?

The list endpoint doesn’t return scopes. You’ll need to loop through the IDs and call getOAuthClient for each one.

const clients = await platformClient.OauthApi.listOAuthClients();
for (const client of clients.entities) {
 const details = await platformClient.OauthApi.getOAuthClient(client.id);
 console.log(client.name, details.scopes);
}