Token jwt expired

Buenos días,
Creo que existe un bug en la API de ZOOM a la hora de hacer una petición usando JWT. Me explico:

Para obtener en enlace de acceso a la sala de ZOOM ejecutamos:


I think there is a bug in the ZOOM API when making a request using JWT. I explain:

To get the access link to the ZOOM room we execute:

$curl = curl_init();

curl_setopt_array($curl, array(
CURLOPT_URL => “https://api.zoom.us/v2/users/me/meetings”,
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => “”,
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 0,
CURLOPT_FOLLOWLOCATION => true,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => “POST”,
CURLOPT_POSTFIELDS =>"{\r\n “topic”: “Clase de Prueba”,\r\n “type”: 2,\r\n “start_time”: “2020-07-23T16:37:38Z”,\r\n “settings”: {\r\n “approval_type”: 2,\r\n “auto_recording”: “cloud”\r\n }\r\n}",
CURLOPT_HTTPHEADER => array(
“Content-Type: application/json”,
“Authorization: Bearer *********”,
“Cookie: _zm_lang=es-ES; cred=88D29B32A83876D8E5FFED231153CD9F”
),
));

$response = curl_exec($curl);

curl_close($curl);

Con la petición anterior, obtenemos el siguiente resultado.:


With the previous request, we obtain the following result:

{
“uuid”: “kJIKKmrWQI+djPGyyQL0UA==”,
“id”: ***********,
“host_id”: “PiWiqeMgStSZmh3E4QFUAw”,
“topic”: “Clase de Prueba”,
“type”: 2,
“status”: “waiting”,
“start_time”: “2020-07-23T16:37:38Z”,
“duration”: 60,
“timezone”: “Europe/Madrid”,
“created_at”: “2020-07-22T13:39:58Z”,
“start_url”: "https://zoom.us/s/98876365864?zak=eyJ6bV9za20iOiJ6bV9vMm0iLCJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.*******,
“join_url”: “https://zoom.us/j/98876365864”,
“settings”: {
“host_video”: false,
“participant_video”: false,
“cn_meeting”: false,
“in_meeting”: false,
“join_before_host”: true,
“mute_upon_entry”: true,
“watermark”: false,
“use_pmi”: false,
“approval_type”: 2,
“audio”: “both”,
“auto_recording”: “cloud”,
“enforce_login”: false,
“enforce_login_domains”: “”,
“alternative_hosts”: “”,
“close_registration”: false,
“registrants_confirmation_email”: true,
“waiting_room”: true,
“request_permission_to_unmute_participants”: false,
“global_dial_in_countries”: [
“US”
],
“global_dial_in_numbers”: [
{
“country_name”: “US”,
“number”: “+1 6465588656”,
“type”: “toll”,
“country”: “US”
},
{
“country_name”: “US”,
“number”: “+1 3017158592”,
“type”: “toll”,
“country”: “US”
},
{
“country_name”: “US”,
“number”: “+1 3126266799”,
“type”: “toll”,
“country”: “US”
},
{
“country_name”: “US”,
“number”: “+1 6699009128”,
“type”: “toll”,
“country”: “US”
},
{
“country_name”: “US”,
“number”: “+1 2532158782”,
“type”: “toll”,
“country”: “US”
},
{
“country_name”: “US”,
“number”: “+1 3462487799”,
“type”: “toll”,
“country”: “US”
}
],
“registrants_email_notification”: true,
“meeting_authentication”: false
}
}

Analizando la URL que nos devuelve ZOOM para acceder a la videoconferencia podemos observar que el tiempo de expiración de la URL (valor: “exp” , después de someter el token “zak” a la decodificación mediante el algoritmo base64) tiene un tiempo anterior a la fecha de la reunión. Es decir. La reunión es creada: 22/07/2020 15:39:58 y vemos que el valor “exp” es: 22/07/2020 17:39:58, es decir, exactamente 2 horas después de crearla. No obstante, como se puede ver en la petición que hacemos a la API de ZOOM, se indica la fecha programada para la videoconferencia, siendo esta el: 23/07/2020 16:37h. Si la videoconferencia se planifica para el día 23, no puede caducar el enlace el día 22.

Espero haberme explicado bien, y puedan indicarnos cómo poder solucionar esta situación.

Saludos y gracias.


Analyzing the URL that ZOOM returns to access the video conference, we can see that the expiration time of the URL (value: “exp”, after submitting the “zak” token to the decoding using the base64 algorithm) has a time prior to the date of the meeting. That is to say. The meeting is created: 07/22/2020 15:39:58 and we see that the value “exp” is: 07/22/2020 17:39:58, that is, exactly 2 hours after creating it. However, as can be seen in the request we make to the ZOOM API, the scheduled date for the videoconference is indicated, this being on: 23/07/2020 16:37 h. If the video conference is scheduled for the 23rd, the link cannot expire on the 22nd.

I hope I have explained myself well, and can you tell us how to solve this situation.

Greetings and thanks.

*This post has been edited to remove any meeting / webinar IDs

Hey @joseperez,

This is the expected behavior. As the Create Meeting Docs say:

"The start_url of a meeting is a URL using which a host or an alternative host can start a meeting. The expiration time for the start_url field is two hours for all regular users.

For users created using the custCreate option via the Create Users API, the expiration time of the start_url field is 90 days.

For security reasons, the recommended way to retrieve the updated value for the start_url field programmatically (after expiry) is by calling the Retrieve a Meeting API and referring to the value of the start_url field in the response."


Este es el comportamiento esperado. Como dice Crear documentos de la reunión:

"El start_url de una reunión es una URL mediante la cual un anfitrión o un anfitrión alternativo pueden iniciar una reunión. El tiempo de vencimiento para el campo start_url es de dos horas para todos los usuarios habituales.

Para los usuarios creados con la opción custCreate a través de la API Crear usuarios, el tiempo de vencimiento de start_url El campo es de 90 días.

Por razones de seguridad, la forma recomendada de recuperar el valor actualizado para el campo start_url mediante programación (después de la expiración) es llamando a Recuperar una API de reunión y haciendo referencia al valor del campo start_url en la respuesta".

Thanks,
Tommy

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.