Trying to kick off a cobrowse session from our custom widget without the user clicking the button first. The docs for the Conversations API show a POST /api/v2/conversations/cobrowse endpoint that takes a cobrowseSession body.
Here is the payload I’m sending:
{
"cobrowseSession": {
"agentId": "12345",
"customerId": "67890",
"name": "Test Session",
"type": "WEBSITE"
}
}
Getting a 400 Bad Request back immediately. The error response is pretty sparse:
{
"message": "Invalid request",
"code": "invalid-request"
}
I’ve verified the agentId and customerId are valid user IDs in the org. The agent is online and available. I can start a session manually through the desktop app just fine. Is there a specific grant or scope missing on the OAuth token? I have cobrowse:write enabled. Also, do I need to include the application object in the payload for this to work? The examples in the swagger are a bit vague on that part.