Using this template helps us debug your issues more effectively
Description
Hi, I am using the Zoom API to create and update meetings. I just tested creation and it worked fine. But when updating, I am getting error.
Error
The error, as seen in the curl response is
{ācodeā:124,āmessageā:āInvalid access token.ā}
Here is my code in PHP:
$url = "https://api.zoom.us/v2/accounts/myid/meetings/".$zoomid;
$httpmethod = "PATCH";
$data = array(
"topic" => $ptitle,
"type" => 2,
"start_time" => $starttime,
"timezone" => 'America/New_York',
"duration" => 90,
"password" => null,
"agenda" => $agenda,
"settings" => array(
"host_video" => true,
"participants_video" => false,
"join_before_host" => true,
"mute_upon_entry" => false,
"watermark" => true,
"approval_type" => 2,
"audio" => 'both',
"auto_recording" => 'none',
"enforce_login" => false,
"enforce_login_domains" => null,
"alternative_hosts" => null
)
);
$data_string = json_encode($data);
curl_setopt_array($curl, 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 => $httpmethod,
CURLOPT_POSTFIELDS => $data_string,
CURLOPT_HTTPHEADER => array(
"authorization: Bearer theJWTtoken",
"content-type: application/json"
),
));
$response = curl_exec($curl);
The PHP vars above are valid, and what I show above as theJWTtoken is the token that I see at App Marketplace under credentials. Also āmyidā shown above in the API url is my valid account id.
Just canāt figure out what might be going on. Ideas?