I created a Zoom Phone marketplace app for recording webhooks, when I recorded a call, I was able to get the call recording download link: https://zoom.us/v2/phone/recording/download/[redacted]
I then created a Server-to-Server OAuth app to get an access token:
{“access_token”:“[redacted]”,“token_type”:“bearer”,“expires_in”:3599,“scope”:“phone:read:list_call_logs:admin phone:read:call_log:admin phone:read:list_recordings:admin phone:read:list_recordings:master phone:read:list_call_queue_recordings:admin phone:read:list_call_queue_recordings:master phone:read:list_audios:admin phone:read:audio:admin phone:read:list_call_recordings:admin phone:read:call_recording:admin phone:delete:call_recording:admin phone:read:recording_transcript:admin phone:read:list_call_recordings:master phone:read:call_recording:master phone:delete:call_recording:master phone:read:recording_transcript:master phone:update:call_recording:admin phone:update:call_recording:master”}
I try to access using a CURL:
curl_setopt_array($ch, array(
CURLOPT_URL => $recording_url,
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => ‘’,
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 0,
CURLOPT_FOLLOWLOCATION => true,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => ‘GET’,
CURLOPT_HTTPHEADER => array(
‘Content-Type: application/json’,
'Authorization: Bearer ’ . $access_token
),
));
However, I get this error in the result:
{“code”:104,“message”:“Invalid access token, does not contain scopes:.”}
Do these need to be within the same app (i.e., do I need to move the webhook subscriptions into my Server to Server OAuth app)? How can I fix this issue?