ServiceNow Data Action 401 Unauthorized after Genesys Cloud Token Refresh

Why does this config cause a persistent 401 Unauthorized error when the Genesys Cloud Data Action attempts to authenticate with ServiceNow using OAuth 2.0? The integration was functioning correctly for three weeks until the access token expiration logic triggered.

The environment is Genesys Cloud 2024-05.0 (EU-West-1) connecting to a ServiceNow instance (Paris 12). The Data Action is configured to use the ‘OAuth Client Credentials’ grant type. The initial token fetch to https://<instance>.service-now.com/oauth_token.do succeeds, returning a valid JWT. However, subsequent requests to POST /api/now/table/incident fail immediately after the token’s 3600-second lifespan expires.

Reviewing the Genesys Cloud logs via the Conversation API, the Data Action step shows:

Status: 401 Unauthorized
Error: Invalid credentials or expired token

ServiceNow logs confirm the token presented is indeed expired. The issue appears to be that Genesys Cloud does not automatically refresh the OAuth token for Data Actions using Client Credentials flow, or the refresh mechanism is broken. The documentation states:

“For OAuth 2.0 integrations, Genesys Cloud manages the token lifecycle automatically. Ensure the client secret is valid and the token endpoint is accessible.” - Genesys Cloud Docs: Integrations with External Systems

This statement contradicts the observed behavior. The token is not being refreshed. I have verified the Client ID and Secret are correct by manually testing the token endpoint in Postman. The refresh token is not being used, likely because Client Credentials flow does not issue a refresh token in our ServiceNow configuration.

Is there a known workaround to force a token refresh in the Data Action configuration? Or is the expectation that we implement a custom Data Action script to handle the refresh logic before making the HTTP call? The current setup requires manual regeneration of the token in Genesys Cloud every hour, which is unsustainable for a 24/7 operation in London.

Any insights on how other teams are handling token persistence for ServiceNow integrations would be appreciated.