Trying to set up a GitHub Actions workflow to push config changes via the Genesys Cloud SDK. The standard OAuth client_credentials flow gives me a token that expires in an hour. My pipeline runs fine if it’s quick, but if it gets stuck in the queue or hits a rate limit retry, the token dies and the job fails with 401 Unauthorized.
I’ve checked the developer docs and the UI settings for the integration. There’s no obvious checkbox for “extend token lifetime” or “long-lived access token”. The refresh_token grant type seems to require a user context which I can’t use for a service account in an automated pipeline.
Is there a specific API endpoint or header I’m missing to get a token that lasts longer than 3600 seconds? Or is the only workaround to call the token endpoint at the start of every single step in the workflow?
Here’s the curl I’m using to test locally:
curl -X POST "https://api.mypurecloud.com/oauth/token" \
-H "Content-Type: application/x-www-form-urlencoded" \
-d "grant_type=client_credentials&client_id=MY_CLIENT_ID&client_secret=MY_SECRET"
Response always has "expires_in": 3600. Feels like a dead end.