# Increase index size to solve “Invalid access token” for Server-to-Server OAuth

**URL:** <https://devforum.zoom.us/t/increase-index-size-to-solve-invalid-access-token-for-server-to-server-oauth/88855>\
**Category:** API and Webhooks\
**Tags:** s2s-oauth\
**Created:** [May 23, 2023, 3:22am UTC](https://devforum.zoom.us/t/increase-index-size-to-solve-invalid-access-token-for-server-to-server-oauth/88855 "2023-05-23T03:22:06Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![laith.maali](https://sea2.discourse-cdn.com/flex016/user_avatar/devforum.zoom.us/laith.maali/32/48747_2.png) [@laith.maali](https://devforum.zoom.us/u/laith.maali)\
**Post date:** [May 23, 2023, 3:22am UTC](https://devforum.zoom.us/t/increase-index-size-to-solve-invalid-access-token-for-server-to-server-oauth/88855/1 "2023-05-23T03:22:06Z")

</div>

### 

**API Endpoint(s) and/or Zoom API Event(s)**  
_[zoom.us/oauth/token](http://zoom.us/oauth/token)_  
AppId: Will be shared in personal message

**Description**  
_New zoom token request invalidate the old one, and “Invalid access token” is being returned_  
We have an application running with 8 instances, Referring to this [thread](https://devforum.zoom.us/t/randomly-receiving-invalid-access-token-for-server-to-server-oauth/74432) the solution should be increasing our app index size to specific number to be able to request more that zoom token and avoid invalidating the old token.

**Concerns**  
should we pass the current index? Actually we challenging configuring the app instances to expose index value, If we increased the app size to 8, Is there a way to call the Oauth api without passing **token\_index?**

Is there a way to get the current allocated index using the zoom APIs?

Right now, we are using the zoom account in the production to generate the zoom token, Is there any affect on the current zoom auth request? Or the index will be defaulted to `0` if it is not passed?

**Error?**  
`{ "code": 124, "message": Invalid access token." }`

**How To Reproduce**  
_Steps to reproduce the behavior:_  
\*1. Request zoom token auth for the same user.  
\*2. Request zoom service with the old token,  
\*3. “code”: 124, “message”: Invalid access token." is being returned.

---

<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:** [May 23, 2023, 8:04pm UTC](https://devforum.zoom.us/t/increase-index-size-to-solve-invalid-access-token-for-server-to-server-oauth/88855/2 "2023-05-23T20:04:48Z")

</div>

Hi @laith.maali if you do not pass the token\_index value, it will be defaulted to 0

---

<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:** [May 26, 2024, 11:41am UTC](https://devforum.zoom.us/t/increase-index-size-to-solve-invalid-access-token-for-server-to-server-oauth/88855/3 "2024-05-26T11:41:30Z")

</div>

Closed on May 26, 2024, 11:41am UTC

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