# API 401 error -- "token id is outside of the token tolerance offset"

**URL:** <https://devforum.zoom.us/t/api-401-error-token-id-is-outside-of-the-token-tolerance-offset/4350>\
**Category:** API and Webhooks\
**Created:** [May 22, 2019, 5:30pm UTC](https://devforum.zoom.us/t/api-401-error-token-id-is-outside-of-the-token-tolerance-offset/4350 "2019-05-22T17:30:47Z")\
**Posts on this page:** 14\
**Page:** 1

<div class="post-metadata">

**Author:** ![brad](https://sea2.discourse-cdn.com/flex016/user_avatar/devforum.zoom.us/brad/32/927_2.png) [@brad](https://devforum.zoom.us/u/brad)\
**Post date:** [May 22, 2019, 5:30pm UTC](https://devforum.zoom.us/t/api-401-error-token-id-is-outside-of-the-token-tolerance-offset/4350/1 "2019-05-22T17:30:47Z")

</div>

I’ve been successfully working with the API for a few days now, but just started getting this 401 today:

> the token id 2is outside of the token tolerance offset 0. The current id is 0

How can I resolve this?

I’ve noticed that each time I exchange a refresh token for new tokens, the “token id” (in this case `2`) increments in the error message, so I have a feeling it may have to do something with that, but I’m not sure what to do to avoid this issue.

Thanks in advance!

## Full HTTP Request & Response

(I redacted the bearer token and cookie out of habit, but let me know if providing those would help.)

```auto
REQUEST
  GET https://api.zoom.us/v2/users/me/recordings?from=2018-05-22+17%3A08%3A49+UTC&page_size=300
  HEADERS: {"Content-Type"=>"application/json", "Authorization"=>"Bearer [REDACTED]", "User-Agent"=>"Faraday v0.15.4"}
  BODY: [NO REQUEST BODY]

RESPONSE
  STATUS: 401
  HEADERS: {"Date"=>"Wed, 22 May 2019 17:08:49 GMT", "Content-Type"=>"application/json;charset=UTF-8", "Transfer-Encoding"=>"chunked", "Connection"=>"keep-alive", "Server"=>"ZOOM", "x-zm-trackingid"=>"WEB_3c9d5e627c0e71eb0793c5bb717b5d30", "Set-Cookie"=>"[REDACTED]"}
  BODY: {"code":124,"message":"the token id 2is outside of the token tolerance offset 0. The current id is 0"}

```

---

<div class="post-metadata">

**Author:** ![TimZoom](https://sea2.discourse-cdn.com/flex016/user_avatar/devforum.zoom.us/timzoom/32/978_2.png) [@TimZoom](https://devforum.zoom.us/u/TimZoom)\
**Post date:** [May 23, 2019, 7:19pm UTC](https://devforum.zoom.us/t/api-401-error-token-id-is-outside-of-the-token-tolerance-offset/4350/2 "2019-05-23T19:19:06Z")

</div>

What happens if you regenerate the clientID/Secret for the app? Does it resolve this issue?

---

<div class="post-metadata">

**Author:** ![drashti.b.patel](https://avatars.discourse-cdn.com/v4/letter/d/9fc348/32.png) [@drashti.b.patel](https://devforum.zoom.us/u/drashti.b.patel)\
**Post date:** [May 29, 2019, 12:12pm UTC](https://devforum.zoom.us/t/api-401-error-token-id-is-outside-of-the-token-tolerance-offset/4350/3 "2019-05-29T12:12:14Z")

</div>

I am also facing the same issue. Can anyone help with this? What is the solution?

---

<div class="post-metadata">

**Author:** ![brad](https://sea2.discourse-cdn.com/flex016/user_avatar/devforum.zoom.us/brad/32/927_2.png) [@brad](https://devforum.zoom.us/u/brad)\
**Post date:** [May 29, 2019, 7:34pm UTC](https://devforum.zoom.us/t/api-401-error-token-id-is-outside-of-the-token-tolerance-offset/4350/4 "2019-05-29T19:34:33Z")

</div>

@TimZoom Error is the same even after rolling the client secret. The number in the error message increments each time I exchange a refresh token, so I believe it has something to do with the refresh and/or bearer tokens. Any other ideas for me to try?

---

<div class="post-metadata">

**Author:** ![brad](https://sea2.discourse-cdn.com/flex016/user_avatar/devforum.zoom.us/brad/32/927_2.png) [@brad](https://devforum.zoom.us/u/brad)\
**Post date:** [May 29, 2019, 7:35pm UTC](https://devforum.zoom.us/t/api-401-error-token-id-is-outside-of-the-token-tolerance-offset/4350/5 "2019-05-29T19:35:38Z")

</div>

@drashti.b.patel Are you also getting this error after exchanging a refresh token?

---

<div class="post-metadata">

**Author:** ![TimZoom](https://sea2.discourse-cdn.com/flex016/user_avatar/devforum.zoom.us/timzoom/32/978_2.png) [@TimZoom](https://devforum.zoom.us/u/TimZoom)\
**Post date:** [May 29, 2019, 8:59pm UTC](https://devforum.zoom.us/t/api-401-error-token-id-is-outside-of-the-token-tolerance-offset/4350/6 "2019-05-29T20:59:09Z")

</div>

I am escalating to our eng team. I will reach out when I know more.

---

<div class="post-metadata">

**Author:** ![pb\_zoom](https://avatars.discourse-cdn.com/v4/letter/p/f08c70/32.png) [@pb\_zoom](https://devforum.zoom.us/u/pb_zoom)\
**Post date:** [June 7, 2019, 4:14pm UTC](https://devforum.zoom.us/t/api-401-error-token-id-is-outside-of-the-token-tolerance-offset/4350/7 "2019-06-07T16:14:20Z")

</div>

I’m also noticing this error when refreshing OAuth access tokens.

After unpacking the access token on [jwt.io](http://jwt.io), I notice a toleranceId: 2 property, not sure if this has anything to do with the underlying issue:

{  
“ver”: “4”,  
“clientId”: “…”,  
“iss”: “urn:zoom:connect:clientid:…”,  
“authenticationId”: “…”,  
“env”: [  
null  
],  
“userId”: “…”,  
“aud”: “[https://oauth.zoom.us](https://oauth.zoom.us)”,  
“accountId”: “…”,  
“nbf”: 1559922892,  
“exp”: 1559926492,  
“tokenType”: “access\_token”,  
“iat”: 1559922892,  
“jti”: “…”,  
**"toleranceId": 2**  
}

Any assistance would be appreciated, this is preventing us from going to production.

---

<div class="post-metadata">

**Author:** ![ojus.zoom](https://sea2.discourse-cdn.com/flex016/user_avatar/devforum.zoom.us/ojus.zoom/32/734_2.png) [@ojus.zoom](https://devforum.zoom.us/u/ojus.zoom)\
**Post date:** [June 7, 2019, 8:08pm UTC](https://devforum.zoom.us/t/api-401-error-token-id-is-outside-of-the-token-tolerance-offset/4350/8 "2019-06-07T20:08:37Z")

</div>

@pb_zoom, we are still working with the engineering team to resolve this issue. I will update this thread once the issue is resolved.

Thanks

---

<div class="post-metadata">

**Author:** ![brad](https://sea2.discourse-cdn.com/flex016/user_avatar/devforum.zoom.us/brad/32/927_2.png) [@brad](https://devforum.zoom.us/u/brad)\
**Post date:** [June 15, 2019, 2:38am UTC](https://devforum.zoom.us/t/api-401-error-token-id-is-outside-of-the-token-tolerance-offset/4350/9 "2019-06-15T02:38:41Z")

</div>

@TimZoom @ojus.zoom Any updates? Thanks in advance!

---

<div class="post-metadata">

**Author:** ![ojus.zoom](https://sea2.discourse-cdn.com/flex016/user_avatar/devforum.zoom.us/ojus.zoom/32/734_2.png) [@ojus.zoom](https://devforum.zoom.us/u/ojus.zoom)\
**Post date:** [June 18, 2019, 1:59am UTC](https://devforum.zoom.us/t/api-401-error-token-id-is-outside-of-the-token-tolerance-offset/4350/10 "2019-06-18T01:59:06Z")

</div>

@brad Although I do not have an exact timeline, we expect this issue to be resolved soon.

Thanks

---

<div class="post-metadata">

**Author:** ![drashti.b.patel](https://avatars.discourse-cdn.com/v4/letter/d/9fc348/32.png) [@drashti.b.patel](https://devforum.zoom.us/u/drashti.b.patel)\
**Post date:** [July 1, 2019, 9:43am UTC](https://devforum.zoom.us/t/api-401-error-token-id-is-outside-of-the-token-tolerance-offset/4350/11 "2019-07-01T09:43:12Z")

</div>

It is happening when I am trying to refresh token.

---

<div class="post-metadata">

**Author:** ![drashti.b.patel](https://avatars.discourse-cdn.com/v4/letter/d/9fc348/32.png) [@drashti.b.patel](https://devforum.zoom.us/u/drashti.b.patel)\
**Post date:** [July 1, 2019, 9:46am UTC](https://devforum.zoom.us/t/api-401-error-token-id-is-outside-of-the-token-tolerance-offset/4350/12 "2019-07-01T09:46:17Z")

</div>

Yes, the same way explained here.

---

<div class="post-metadata">

**Author:** ![ojus.zoom](https://sea2.discourse-cdn.com/flex016/user_avatar/devforum.zoom.us/ojus.zoom/32/734_2.png) [@ojus.zoom](https://devforum.zoom.us/u/ojus.zoom)\
**Post date:** [July 1, 2019, 9:54pm UTC](https://devforum.zoom.us/t/api-401-error-token-id-is-outside-of-the-token-tolerance-offset/4350/13 "2019-07-01T21:54:31Z")

</div>

@drashti.b.patel we are still working with the engineering team to resolve this issue. I will update this thread once the issue is resolved.

Thanks

---

<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, 6:28pm UTC](https://devforum.zoom.us/t/api-401-error-token-id-is-outside-of-the-token-tolerance-offset/4350/14 "2020-08-21T18:28:38Z")

</div>

Closed on August 21, 2020, 6:28pm UTC


