Hi everyone,
We are currently integrating our CXone Studio IVR with a NICE Cognigy Voicebot for complex query handling. The goal is to use the Transfer block to hand over the active voice session to the bot endpoint. However, the transfer consistently fails with a 500 Internal Server Error immediately after the block executes.
We have verified the OAuth token generation script in the Studio snippet. The token request to https://login.nicecxone.com/oauth/token returns a valid access_token with the correct scope for voicebot.transfer. The token is stored in a local variable local.token.
Here is the relevant snippet configuration for the REST proxy call:
// GetRESTProxy: cognigyTransfer
// URL: https://{org_id}.platform.nicecxone.com/api/v2/voicebots/transfers
// Method: POST
// Headers:
// Authorization: Bearer {local.token}
// Content-Type: application/json
// Body:
// {
// "sessionId": "{interaction.sessionId}",
// "botId": "cognigy-bot-v2",
// "targetType": "VOICEBOT"
// }
The response payload from the proxy call is:
{
"message": "Failed to initiate handover. Session context mismatch.",
"code": "SESSION_INVALID"
}
We are using the interaction.sessionId from the Studio context, which should be valid for the duration of the call. The Cognigy bot is configured to accept external transfers. We have checked the CXone logs, and the API gateway is receiving the request but rejecting it before it hits the bot runtime.
Is there a specific claim in the JWT token that needs to be present for voicebot transfers? Or is the sessionId format different when initiating from Studio compared to a web widget?
Any insights on the SESSION_INVALID error would be appreciated. We are running this in the us-east-1 environment.
Thanks.