Trying to kick off a cobrowse session programmatically using the Kotlin SDK (genesys-cloud-kotlin). The docs for /api/v2/conversations/cobrowse/sessions are pretty thin on actual request bodies, so I’m guessing at the structure based on the OpenAPI spec.
Here’s what I’m sending:
val sessionRequest = CobrowseSessionRequest(
type = "cobrowse",
to = listOf(ConversationParticipantRequest(
id = targetUserId,
address = targetUserId,
type = "user"
)),
from = ConversationParticipantRequest(
id = agentUserId,
address = agentUserId,
type = "user"
)
)
val response = conversationsApi.createCobrowseSession(sessionRequest)
The API returns a 400 Bad Request with this payload:
{
"errors": [
{
"code": "invalid_request",
"message": "Missing required property 'to' or invalid participant configuration."
}
]
}
I’ve confirmed both targetUserId and agentUserId are valid users in the org and currently online. The to list isn’t null. Is the address field supposed to be something other than the user ID? Maybe a specific cobrowse token or session handle? The SDK mapper seems to be swallowing some of the optional fields I tried adding like routingData or metadata.
Checked the network trace and the JSON being serialized looks correct. Just can’t figure out what the API considers an “invalid participant configuration” in this context.