# JWT Authentication failure

**URL:** <https://devforum.zoom.us/t/jwt-authentication-failure/16471>\
**Category:** API and Webhooks\
**Created:** [May 6, 2020, 9:10pm UTC](https://devforum.zoom.us/t/jwt-authentication-failure/16471 "2020-05-06T21:10:24Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![namdev](https://avatars.discourse-cdn.com/v4/letter/n/a88e4f/32.png) [@namdev](https://devforum.zoom.us/u/namdev)\
**Post date:** [May 6, 2020, 9:10pm UTC](https://devforum.zoom.us/t/jwt-authentication-failure/16471/1 "2020-05-06T21:10:24Z")

</div>

**Description**  
About two weeks ago I had an app successfully making API requests to Zoom using JWT which is now not working. I was able to take a look at an example of a failed API request using Fiddler and I saw that the response was a 401 Unauthorized with the body including the message

**The Token can’t be used before Wed May 06 19:18:54 UTC 2020.**

With Fiddler I could determine the JWT token my app generated and by entering the token into [JWT.io](http://JWT.io) I find that the value for nbf (not valid before) is

**Wed May 06 2020 15:18:54 GMT-0400 (Eastern Daylight Time)**

This is an exact four hour difference, which I’ve found consistent across other requests. Strangely, if I submit a similar API request (same endpoint, different body) using Postman, with the JWT token that my app generated, the call _works_ as expected. The easiest solution would be to remove nbf from the JWT token, however the library I’m using (Microsoft’s IdentityModel framework) seems to have it’s own issues with that. Again, the app worked two weeks ago having nbf included.

So, in summary, my issue seems to be that the endpoint rejects my request due to the nbf value being later than the current time. However, I verified by looking at an intercepted request that the token has an appropriate nbf value.

If it helps, the endpoint I am requesting is [https://api.zoom.us/v2/meetings/{meeting-id}/registrants](https://api.zoom.us/v2/meetings/%7Bmeeting-id%7D/registrants)

**Screenshots (If applicable)**  
App HTTPS request

 ![AppHTTPSRequest](https://us1.discourse-cdn.com/flex016/uploads/zoomdeveloper/original/2X/b/bbe816190c7d5f6c79a9641449cfc94def34803a.png)

Postman HTTPS request

 ![PostmanHTTPSRequest](https://us1.discourse-cdn.com/flex016/uploads/zoomdeveloper/original/2X/7/7af090959794b5b372970a859401e60df0d424bc.png)

---

<div class="post-metadata">

**Author:** ![namdev](https://avatars.discourse-cdn.com/v4/letter/n/a88e4f/32.png) [@namdev](https://devforum.zoom.us/u/namdev)\
**Post date:** [May 6, 2020, 9:21pm UTC](https://devforum.zoom.us/t/jwt-authentication-failure/16471/2 "2020-05-06T21:21:09Z")

</div>

I tried setting the nbf value to an hour before the current time and that seems to have fixed the problem I was having. Funny how I can spend two days working on this and five minutes after making a forum post I seem to fix it myself. 🤷‍♂️

---

<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:** [May 12, 2020, 5:01am UTC](https://devforum.zoom.us/t/jwt-authentication-failure/16471/3 "2020-05-12T05:01:39Z")

</div>

Happy to hear you figured it out @namdev! 🙂

Let us know if you have any other questions!

Thanks,  
Tommy

---

<div class="post-metadata">

**Author:** ![DeveloperBot](https://sea2.discourse-cdn.com/flex016/user_avatar/devforum.zoom.us/developerbot/32/12632_2.png) [@DeveloperBot](https://devforum.zoom.us/u/DeveloperBot)\
**Post date:** [August 21, 2020, 9:15pm UTC](https://devforum.zoom.us/t/jwt-authentication-failure/16471/4 "2020-08-21T21:15:18Z")

</div>

Closed on August 21, 2020, 9:15pm UTC


