Trying to start a cobrowse session via the Conversations API but getting a 404. The endpoint docs say it should work for active chat conversations. Here is the request:
POST /api/v2/conversations/chat/{conversationId}/cobrowse
{
"providerId": "genesys"
}
Returns 404 Not Found. The conversation exists and is active. Am I missing a required header or is the endpoint deprecated?
Check your OAuth scopes first. This is the #1 reason for 404s on conversation sub-resources. If the token doesn’t have conversation:write or cobrowse:write, the API returns 404 instead of 403 to avoid leaking resource existence.
The docs state: “The client must have the appropriate scopes to access the endpoint.” You’re likely using a generic openid or user:read token. Here’s how to verify and fix it using the PureCloud SDK (Java):
// 1. Verify current token scopes
AccessTokenResponse token = platformClient.getOAuthApi().getAccessToken();
System.out.println("Scopes: " + token.getScope());
// 2. Ensure 'conversation:write' and 'cobrowse:write' are present
// If missing, re-authenticate with these scopes in your client credentials flow
String[] requiredScopes = {"conversation:write", "cobrowse:write", "openid"};
// 3. Attempt the cobrowse start with a valid token
ConversationApi convApi = new ConversationApi(platformClient);
CobrowseSession session = new CobrowseSession();
session.setProviderId("genesys"); // Must match your configured provider
try {
// Note: The endpoint is actually /api/v2/conversations/chat/{id}/cobrowse/sessions
// Check if you're hitting the correct path variant
ApiResponse<CobrowseSession> response = convApi.postConversationChatCobrowseSessions(
conversationId,
session,
null, // headers
null // queryParams
);
System.out.println("Session ID: " + response.getBody().getId());
} catch (ApiException e) {
System.err.println("Error: " + e.getMessage());
System.err.println("Response Code: " + e.getCode());
}
Also, double-check the exact path. Some older SDK versions map postConversationChatCobrowse incorrectly. The current valid endpoint is POST /api/v2/conversations/chat/{conversationId}/cobrowse/sessions. If you’re hitting the base path without /sessions, you’ll get a 404.
Verify the conversation state too. Cobrowse only works if the chat is in connected state, not queued or closed. The API won’t start a session on a pending chat.
Check the providerId value. It must match the ID of the cobrowse provider configured in your org settings under Admin > Integrations > Cobrowse. If it’s “genesys” but your org uses a custom provider ID, it’ll fail silently or with a 404.
Run a quick check on the provider list:
curl -X GET "https://api.mypurecloud.com/api/v2/cobrowse/providers" \
-H "Authorization: Bearer $ACCESS_TOKEN"
Match that ID exactly. Case-sensitive.