Genesys OAuth client secret rotation causing 401s

Just noticed that updating the secret via the UI while the ServiceNow integration is running causes immediate 401 errors.

  • Environment: Genesys Cloud, ServiceNow
  • Method: POST /api/v2/oauth/clientcredentials

i’m trying to rotate without downtime. the docs say you can have two active secrets but my token exchange script fails instantly after the update.

resp = requests.post(token_url, data=payload)
print(resp.status_code) # 401

is the old secret invalidated immediately?

This looks like a cache issue on your side.

  • check if you’re holding onto an old token in memory.
  • force a refresh by clearing the token cache before the next request.
  • the API docs say: “Tokens are valid for one hour.” you’re probably using a stale one.