Setting up a headless CI/CD pipeline to deploy Architect flows using the genesys-cloud-purecloud-platform-client in Node. The goal is a long-lived session without manual intervention. Using the client credentials grant type with a registered app. The initial access token comes back fine, but the response lacks a refresh_token field.
Here’s the config:
const config = {
clientId: process.env.GC_CLIENT_ID,
clientSecret: process.env.GC_CLIENT_SECRET,
grantType: 'client_credentials'
};
const client = new PlatformClient(config);
const auth = await client.auth.clientCredentialsGrant();
The docs mention refresh tokens are available for authorization code flow, but that requires a user context. For a service account, is there a different endpoint or SDK method to get a refreshable token? Or am I stuck polling /oauth2/token every 35 minutes? The pipeline breaks when the token expires mid-deployment.