const { PlatformClient } = require(“genesys-cloud-platform-client”);
const api = PlatformClient.init({
clientId: “my-client-id”,
clientSecret: “my-secret”,
basePath: “https://api.mypurecloud.com”
});
await api.auth.login();
const clients = await api.oauth.getOauthClients();
console.log(clients);
// Output:
Running this in a Node script with @genesys/cloud-platform-client v2.5.0. The my-client-id belongs to a user with full admin rights and the oauth:client:read scope is explicitly added. Calling GET /api/v2/oauth/clients directly via curl with the same token returns the full list of clients with their scope assignments. The SDK method oauth.getOauthClients() consistently returns an empty array. No 401 or 403 errors, just silence. Checked the request headers in the SDK debug logs; they look identical to the curl request. Is there a hidden pagination parameter or a specific header required by the SDK wrapper that I’m missing? The TypeScript definitions for the response model look correct, so it’s not a type mismatch issue. Seems like a bug in the request builder for this specific endpoint.