Hey everyone.
We’re seeing a persistent 500 error in a Genesys Cloud Architect Data Action when querying the NICE Cognigy profile endpoint. The goal is simple: pull the user profile token to pass into a downstream API call.
The Data Action config looks standard. Method is GET. URL is https://api.nice-cognigy.com/v1/users/profiles. We’re passing the Authorization header with a Bearer token. The response from Cognigy comes back fine in Postman (200 OK).
But in GC, the Data Action fails with this error in the logs:
Error: JSON parse error: Unexpected token < in JSON at position 0
Here’s the payload structure we’re expecting from Cognigy:
{
"status": "success",
"data": {
"userId": "12345",
"profileToken": "abc-xyz-123"
}
}
I’ve checked the Content-Type header on the response. It’s application/json; charset=utf-8.
I’ve also tried adding a Accept: application/json header to the outgoing request from the Data Action. No change.
The weird part is the “Unexpected token <” error. That usually means an HTML page is coming back instead of JSON. Like a 401 or 500 error page from the server. But the HTTP status code in the GC logs is 200.
Is there a known issue with how Genesys Cloud parses the response body if there’s extra whitespace or a BOM character? Or maybe the Cognigy endpoint is returning a redirect (301/302) that GC isn’t following correctly, resulting in an HTML redirect page being parsed as JSON?
I’ve verified the URL in the Data Action is correct. No typos. The token is valid.
Anyone seen this specific parse error with Cognigy integrations? What’s the next step for debugging the actual response body GC is seeing?