# Refresh token request failing with 401

**URL:** <https://devforum.zoom.us/t/refresh-token-request-failing-with-401/6447>\
**Category:** API and Webhooks\
**Created:** [October 29, 2019, 6:21pm UTC](https://devforum.zoom.us/t/refresh-token-request-failing-with-401/6447 "2019-10-29T18:21:43Z")\
**Posts on this page:** 1\
**Showing post:** 48

<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:** [December 24, 2019, 8:58pm UTC](https://devforum.zoom.us/t/refresh-token-request-failing-with-401/6447/48 "2019-12-24T20:58:06Z")

</div>

Hey @tsykul, @nathan.arora, @alon, @roy, @shane.zoom, @ps40,

Here are updates on the Invalid Token bug:

Conditions: This problem can arise when a token is granted and then  
immediately used to call a Zoom API endpoint. The server that issues  
the new token sets the nbf (not valid before) time to be the time  
“exactly now.” But not all servers at Zoom have synchronized  
clocks. If the token is immediately used for an API endpoint that is  
on a different server, that server’s local clock may be up to a second  
too slow, with a time before the token’s nbf time, causing the server  
to reject the token.

This bug applies to:

- All token requests: Both original token grants, and refresh grants.
- All tokens: that includes JWT tokens, as well as OAuth tokens of  
both grant types: authorization\_code and client\_credentials.

Reproducibility: This problem is either 0% or 90% reproducible: it  
depends how the Zoom load balancer forwards API requests to Zoom  
servers. It can happen either all the time, or not at all, depending  
on your source IP address.

Fix time: We will have a fix that will roll out in an upcoming release.

Work-around: After acquiring a token, wait 1 second before using it.

Thanks,  
Tommy

---

_[View the full topic](https://devforum.zoom.us/t/refresh-token-request-failing-with-401/6447)._
