Data Action failing to parse JSON from NICE Cognigy token endpoint

I’m trying to build a Data Action that pulls the latest profile token from our NICE Cognigy instance so we can pass it into the Architect flow for WFM context. The goal is to grab the agent’s current session ID before routing.

Here is the JSON configuration for the Data Action I’ve set up. It targets the Cognigy API endpoint that handles the token retrieval.

{
 "type": "https",
 "url": "https://api.cognigy.ai/api/v1/agents/{agentId}/session-token",
 "method": "GET",
 "headers": {
 "Authorization": "Bearer {{externalToken}}",
 "Content-Type": "application/json"
 }
}

The issue is that the Data Action fails every time. The error log in Genesys Cloud says “Invalid JSON response”. I’m confused because if I hit that same URL from Postman with the same headers, I get back a clean JSON object like this:

{
 "token": "abc-123-xyz",
 "expiresIn": 3600
}

I’ve checked the {{externalToken}} variable, and it’s definitely valid. It’s not expiring. The endpoint returns a 200 OK. So why does Genesys Cloud think the response is invalid?

I tried adding a responseParser in the Data Action config to explicitly look for the token field, but that didn’t help either. The error remains the same. I’m wondering if there’s something about how the Cognigy API returns the data that Genesys doesn’t like. Maybe it’s the charset or some hidden characters?

Has anyone done this before? I’m stuck on this parsing error. It’s blocking the whole flow.