We’ve been trying to kick off a cobrowse session programmatically from our Node.js backend during a voice-to-web handoff. The goal is to have the agent receive the cobrowse prompt immediately after we transfer the conversation context.
We’re using the Genesys Cloud JS SDK (version 9.0.12) to make the call. Here’s the snippet we’re running:
const conversation = await conversationApi.postConversationsCobrowse({
cobrowse: {
type: "cobrowse",
to: [
{
id: agentUserId,
type: "user"
}
],
from: {
id: userId,
type: "user"
}
}
});
The API call succeeds with a 200 OK. We get back a sessionId and the response looks valid. But nothing happens on the agent’s side. They don’t see the cobrowse invitation pop up in the CXone desktop.
We’ve checked the logs and the session is created in the system, but it stays in pending state forever. If we manually trigger a cobrowse from the UI, it works fine. Is there a specific prerequisite we’re missing in the API payload? Maybe a permission flag or a specific conversation type requirement?
Also, should we be using patchConversationsCobrowse instead? We tried that and it threw a 404 because the cobrowse resource didn’t exist yet on the conversation.
Any ideas on why the programmatic initiation is silent?