Problem
I’m building a New Relic integration to monitor the health of our Genesys Cloud API consumers. As part of the onboarding check, I need to programmatically list all OAuth clients in the org and verify their assigned scopes.
Code
I’m using the Python SDK and tried the following approach:
from genesyscloud.platform_client import PlatformClient
from genesyscloud.api_client import ApiClient
platform_client = PlatformClient.create()
api_client = platform_client.get_api_client()
# Attempting to fetch clients
response = api_client.get_authorization_clients()
Error
The get_authorization_clients() method isn’t returning the full list of clients. It only returns a paginated subset, and the documentation for the /api/v2/authorization/clients endpoint is sparse on pagination parameters. I’m getting a 200 OK, but the entities array is truncated.
Question
Is there a specific cursor or page-size parameter I need to pass to get_authorization_clients() to retrieve the complete list? Or is there a different endpoint that provides a full dump of client IDs and their scope mappings? The goal is to iterate through each client and check if they have the oauth:view scope.
The current response structure looks like this:
{
"entities": [
{
"id": "client-id-1",
"name": "Web App Client"
}
],
"pageSize": 25,
"total": 42
}
I’m stuck on how to handle the pagination loop correctly in the SDK.