# Token jwt expired

**URL:** <https://devforum.zoom.us/t/token-jwt-expired/25017>\
**Category:** API and Webhooks\
**Created:** [July 23, 2020, 7:19pm UTC](https://devforum.zoom.us/t/token-jwt-expired/25017 "2020-07-23T19:19:15Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![joseperez](https://avatars.discourse-cdn.com/v4/letter/j/ce7236/32.png) [@joseperez](https://devforum.zoom.us/u/joseperez)\
**Post date:** [July 23, 2020, 7:19pm UTC](https://devforum.zoom.us/t/token-jwt-expired/25017/1 "2020-07-23T19:19:15Z")

</div>

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](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.\*\*\*\*\*\*\*](https://zoom.us/s/98876365864?zak=eyJ6bV9za20iOiJ6bV9vMm0iLCJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9. ******* ),  
“join\_url”: “[https://zoom.us/j/98876365864](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

---

<div class="post-metadata">

**Author:** ![tommy](https://sea2.discourse-cdn.com/flex016/user_avatar/devforum.zoom.us/tommy/32/72769_2.png) [@tommy](https://devforum.zoom.us/u/tommy)\
**Post date:** [July 27, 2020, 10:49pm UTC](https://devforum.zoom.us/t/token-jwt-expired/25017/2 "2020-07-27T22:49:29Z")

</div>

Hey @joseperez,

This is the expected behavior. As the [Create Meeting Docs](https://marketplace.zoom.us/docs/api-reference/zoom-api/meetings/meetingcreate) 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](https://marketplace.zoom.us/docs/api-reference/zoom-api/users/usercreate) 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](https://marketplace.zoom.us/docs/api-reference/zoom-api/meetings/meeting) 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](https://marketplace.zoom.us/docs/api-reference/zoom-api/meetings/meetingcreate):

"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](https://marketplace.zoom.us/docs/api-reference/zoom-api/users/usercreate), 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](https://marketplace.zoom.us/docs/api-reference/zoom-api/meeting/meeting) y haciendo referencia al valor del campo `start_url` en la respuesta".

Thanks,  
Tommy

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/flex016/uploads/zoomdeveloper/original/3X/6/1/614bdd549b610bbaa46ff934617683a02bdaa03c.png) [@system](https://devforum.zoom.us/u/system)\
**Post date:** [August 3, 2020, 10:49pm UTC](https://devforum.zoom.us/t/token-jwt-expired/25017/3 "2020-08-03T22:49:44Z")

</div>

Closed on August 3, 2020, 10:49pm UTC

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