stuck on trying to programmatically start a recording for an active conversation. i’m migrating some logic from Five9 where we had direct control, but the CXone docs are a bit sparse on the exact flow for the Recording API.
i have the conversation ID from the websocket stream. i’m trying to hit the POST /api/v2/recordings/conversations/{conversationId}/recordings endpoint. here’s the curl command i’m testing with in postman first:
curl -X POST "https://api.mypurecloud.com/api/v2/recordings/conversations/12345/recordings" \
-H "Content-Type: application/json" \
-H "Authorization: Bearer <token>" \
-d '{"providerName": "default", "recordingName": "test-rec-001"}'
getting a 401 Unauthorized back immediately. i’m using the same OAuth2 token that works fine for fetching user profiles, so i don’t think it’s expired. maybe i’m missing a scope? i’ve added recording:read and recording:write to my app config but still no luck.
“To start a recording, send a POST request to the recordings endpoint for the specific conversation. Ensure the access token has the necessary permissions to modify recording settings.”
is there a specific scope i’m missing? or is this endpoint even the right one for manual triggers? tried searching the forum but most threads are about fetching existing recordings.