Building a custom control panel in Kotlin for our Android app. Need to drop a specific leg from an active conference call without terminating the whole session. The genesyscloud-conv-api SDK doesn’t seem to have a direct method for this, so I’m hitting the REST endpoint manually via OkHttp.
Target endpoint:
POST /api/v2/conversations/conferences/{conferenceId}/participants/{participantId}/drop
Here’s the request setup:
val url = "https://mypurecloud.api.mypurecloud.com/api/v2/conversations/conferences/$conferenceId/participants/$participantId/drop"
val request = Request.Builder()
.url(url)
.addHeader("Authorization", "Bearer $accessToken")
.addHeader("Content-Type", "application/json")
.post(body)
.build()
client.newCall(request).enqueue(object : Callback {
override fun onFailure(call: Call, e: IOException) {
// ...
}
override fun onResponse(call: Call, response: Response) {
// ...
}
})
Getting a 404 Not Found. Verified the conferenceId is valid by calling GET /api/v2/conversations/conferences/{id} right before. That returns a 200 with the correct participant list. The participantId matches one of the strings in that list exactly.
Is the path structure different for conferences vs regular conversations? Docs are thin on the drop action specifics. Tried removing the trailing slash too, no luck. Just returns 404 every time. Checked the access token scope, has conversation:write.
What am I missing here?