Trying to control call recordings programmatically via the CXone REST API. The goal is to start a recording on demand and stop it after a specific condition is met in the script.
I’m using the REST Proxy action in to make the calls. The endpoints are:
- POST /api/v2/recording/recordingcontrols/start
- POST /api/v2/recording/recordingcontrols/stop
The Authorization header is set to Bearer <token> where the token is retrieved from a previous action. The token works fine for other calls like fetching participant data. But these recording endpoints always return a 401 Unauthorized. The response body is empty.
Here is the JSON payload for the start request:
{
"conferenceId": "conf-123",
"recordingName": "test_rec"
}
I’ve checked the OAuth client permissions. It has recording:write and recording:read. The division scope is correct. The token is not expired. Other recording-related calls, like listing recordings, work fine with the same token.
Tried adding the Content-Type: application/json header. Tried different token scopes. Tried using the long-lived token instead of the short-lived one. All result in 401.
Is there a specific permission or header missing for the recording controls endpoints? The documentation doesn’t mention any special requirements beyond standard OAuth. The call ID and conference ID are valid. The call is active.
Any ideas why the recording controls endpoints are rejecting the token while other endpoints accept it?