I was used JWT previously to fetch meeting recording.
And recently i migrated my app from jwt to outh. All working good.
I am facing problem while fething meeting recording.
So following is my old PHP code
public function meeting_recording(){
header(“Content-Type: application/json; charset=UTF-8”);
$params = json_decode(file_get_contents(‘php://input’), TRUE);
$meeting_id = $params[‘meeting_id’];
$request_url = “https://api.zoom.us/v2/meetings/“.$meeting_id.”/recordings”;
$token = array(
“iss” => API_KEY,
“exp” => time() + 3600
);
$getJWTKey = JWT::encode($token, API_SECRET);
$headers = array(
"authorization: Bearer " . $getJWTKey,
“content-type: application/json”,
“Accept: application/json”,
);
$ch = curl_init();
curl_setopt_array($ch, array(
CURLOPT_URL => $request_url,
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => $headers,
));
$result = curl_exec($ch);
$err = curl_error($ch);
curl_close($ch);
if (!$result)
{
return $err;
}
// echo $result;
$result = json_decode($result);
foreach($result->recording_files as $key=>$value){
$result->recording_files[$key]->password = $result->password;
$result->recording_files[$key]->title = $result->topic;
}
if($result)
{
// $result->meeting_details= $this->db->get_where('live_class',array('meeting_id'=>$params['meeting_id']))->row();
$data["response"] = true;
$data["data"] = $result;
}else{
$data["response"] = false;
$data["message"] = 'Data Not Available';
}
echo json_encode($data);
}
One more thing, i used this api for attendee(student) side.
So can you please suggest what should i do for fetching recording from oauth app