CXone Studio GetRESTProxy returning 502 during Cognigy Voicebot handover

Hey folks,

I’m hitting a wall with our hybrid bot-to-agent handover flow in CXone Studio. We’ve got the NICE Cognigy Voicebot handling initial intake, and once it decides to transfer, it needs to pass context to our Studio IVR before routing to an agent. The Cognigy side is hitting our custom endpoint, which then invokes a Studio subflow via the CXone API. The issue is that the GetRESTProxy activity in Studio keeps failing with a 502 Bad Gateway when trying to fetch the session state from our middleware.

Here’s the setup. Cognigy sends a POST to our middleware with the transferReason and intent. The middleware then calls the CXone API to update the interaction and trigger the Studio handover. I’ve simplified the Studio flow to just a GetRESTProxy call to verify the connection.

The code block in Studio looks like this:

GetRESTProxy('POST', 'https://our-middleware.com/api/handover/verify', {
 'Content-Type': 'application/json',
 'Authorization': 'Bearer ' + GetContextVariable('cxone_token')
}, JSON.stringify({
 'interactionId': GetContextVariable('interactionId'),
 'timestamp': GetContextVariable('timestamp')
}));

The error returned in the Studio trace is:

Error Code: 502
Message: Bad Gateway
Details: The upstream server did not respond in time.

I’ve confirmed the middleware is up and responding to other calls. The cxone_token is valid and has the right scopes. I even tried adding a timeout override, but it still times out after 5 seconds. It feels like the Studio runtime is struggling to reach out to our external endpoint during the active conversation context. Is there a specific limitation with GetRESTProxy during a live voice interaction? Or am I missing a configuration step for outbound calls from Studio?

Any ideas on how to debug the 502 from within the Studio environment?