Running into a wall with a custom Data Action that queries our NICE CXone instance for a Cognigy profile token. The goal is to inject this token into the Genesys Cloud context so we can correlate spans in Jaeger. The Data Action works fine in the test console with static JSON, but fails in production with a generic parsing error.
Here is the JSON payload I’m sending to the external endpoint via the Data Action’s HTTP request:
{
"method": "GET",
"url": "https://api.nicecxone.com/api/v2/integrations/cognigy/profile",
"headers": {
"Authorization": "Bearer {{auth_token}}",
"Content-Type": "application/json"
}
}
The response from NICE looks like this:
{
"token": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9...",
"expires_in": 3600
}
When the Data Action tries to map response.json.token to the output variable cognigy_token, it throws:
Error: Failed to parse JSON response. Expected object or array.
I’ve checked the response headers and it’s definitely application/json. The Content-Length matches the body size. I’m using the latest version of the platform SDK for the initial auth token fetch, but this specific call is a raw HTTP GET inside the Data Action config. Is there a known issue with how Genesys Cloud parses responses from NICE CXone endpoints? Or am I missing a header that forces a specific content type interpretation?