Invalid access token error in ZOOM

The problem is that I can not communicate with the ZOOM server using cURL, because when the code is executed, it throws the error:

api_key=zo6vnIDiTD6sN2fuQ7hGrA&api_secret=Z9iiHMSL6CEt35IVk9Z3MDYP0jWKZRR&data_type=JSON&userId=profesor%40bitbcn.orgstring(46) “{“code”:124,“message”:“Invalid access token.”}”

This message is obtained after applying a var_dump () to my array containing the response of the server.

My code

function getGrabacionesZOOM(){
        $request_url = $this->url;

/*Adds the Key, Secret, & Datatype to the passed array*/
$data['api_key'] = $this->api_key_ZOOM;
$data['api_secret'] = $this->api_secret_ZOOM;
$data['data_type'] = 'JSON';
        $data['userId']= '';

$postFields = http_build_query($data);
/*Check to see queried fields*/
/*Used for troubleshooting/debugging*/
echo $postFields;

/*Preparing Query...*/
$ch = curl_init();
curl_setopt($ch, CURLOPT_RETURNTRANSFER,1);
curl_setopt($ch, CURLOPT_URL, $request_url);
curl_setopt($ch, CURLOPT_POST, 1);
curl_setopt($ch, CURLOPT_POSTFIELDS, $postFields);
curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, false); 
//variable contenedora de la respuesta
$response = curl_exec($ch);


This code should be able to get this answer and then start analyzing the array.

“from”: “string [date]”,
“to”: “string [date]”,
“page_count”: “integer”,
“page_size”: “integer”,
“total_records”: “integer”,
“next_page_token”: “string”,
“meetings”: [
“uuid”: “string”,
“id”: “string”,
“account_id”: “string”,
“host_id”: “string”,
“topic”: “string”,
“start_time”: “string [date-time]”,
“duration”: “integer”,
“total_size”: “string”,
“recording_count”: “string”,
“recording_files”: [
“id”: “string”,
“meeting_id”: “string”,
“recording_start”: “string”,
“recording_end”: “string”,
“file_type”: “string”,
“file_size”: “number”,
“play_url”: “string”,
“download_url”: “string”,
“status”: “string”,
“deleted_time”: “string”,
“recording_type”: “string”

As indicated in the documentation and in most cases the code is obtained from an example of github

Thank you and I hope your support soon.


The sample PHP app that you are trying to use is deprecated. We will inform you once we create a new one.
In the mean time, can you please provide us with the error / error codes that you are receiving?


Ok then, how I could correctly implement this api in my Script. Thanks for your support.


I have replied to your PM.