API Endpoint(s) and/or Zoom API Event(s)
Zoom Meeting API
Description
Although my access token allow me to list recording, although my token has /recording:write:admin scope, my Curl request to delete a recording returns nothing. None of the documented codes, but 0.
Error?
I’m expecting one of the return codes of the API (200, 204, 400, 404). Instead, here is a curl_getinfo() of my Curl handle (PHP):
(
[url] => /meetings/XXXXXXXXXXXX6cHhBg%3D%3D/recordings/38be501d-1a82-4782-9c12-XXXXXXXXXXXX
[content_type] =>
[http_code] => 0
[header_size] => 0
[request_size] => 0
[filetime] => -1
[ssl_verify_result] => 0
[redirect_count] => 0
[total_time] => 0
[namelookup_time] => 0
[connect_time] => 0
[pretransfer_time] => 0
[size_upload] => 0
[size_download] => 0
[speed_download] => 0
[speed_upload] => 0
[download_content_length] => -1
[upload_content_length] => -1
[starttransfer_time] => 0
[redirect_time] => 0
[redirect_url] =>
[primary_ip] =>
[certinfo] => Array
(
)
[primary_port] => 0
[local_ip] =>
[local_port] => 0
[http_version] => 0
[protocol] => 0
[ssl_verifyresult] => 0
[scheme] =>
[appconnect_time_us] => 0
[connect_time_us] => 0
[namelookup_time_us] => 0
[pretransfer_time_us] => 0
[redirect_time_us] => 0
[starttransfer_time_us] => 0
[total_time_us] => 0
)
How To Reproduce
function zoom_delete($meeting_id,$recording_id) {
$url=“/meetings/”.urlencode($meeting_id).“/recordings/$recording_id”;
$ch = curl_init($url); // Initialise cURL
$token=getZoomToken();
curl_setopt_array($ch, array(
CURLOPT_URL => $url,
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => “”,
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => (“DELETE”),
CURLOPT_HTTPHEADER => array(
“Content-Type: application/json”,
"authorization: Bearer “.$token->access_token
),
));
try {
print_r(“Deleting meeting $meeting_id, recording $recording_id\n”);
$result = curl_exec($ch);
print_r(“Deleting meeting $meeting_id, recording $recording_id RETURNED :\n”);
print_r($result);
print_r(curl_getinfo($ch));
} catch (Exception $e) {
print_r(“Deleting meeting $meeting_id, recording $recording_id FAILED :\n”);
$err = curl_error($ch);
print_r($err->getMessage().” delete failed : $err, ".print_r($ch,true));
}
print("Curl info : ".print_r(curl_getinfo($ch),true));
curl_close($ch); // Close the cURL connection
print("Delete of meeting $meeting_id, recording $recording_id : ".print_r($result,true));
return(json_decode($result)); // Return the received data
}
Any help is dearly appreciated. Thank you.