# Server 2 Server token expiration time

**URL:** <https://devforum.zoom.us/t/server-2-server-token-expiration-time/84813>\
**Category:** Authentication\
**Tags:** server-to-server\
**Created:** [March 16, 2023, 1:38pm UTC](https://devforum.zoom.us/t/server-2-server-token-expiration-time/84813 "2023-03-16T13:38:37Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![MarceloErthal](https://sea2.discourse-cdn.com/flex016/user_avatar/devforum.zoom.us/marceloerthal/32/46461_2.png) [@MarceloErthal](https://devforum.zoom.us/u/MarceloErthal)\
**Post date:** [March 16, 2023, 1:38pm UTC](https://devforum.zoom.us/t/server-2-server-token-expiration-time/84813/1 "2023-03-16T13:38:37Z")

</div>

Hi folks,

My server-2-server token is expiring in 10 minutes! Acording to the documentation It should last 1 hour!

in this 10 minutes I can call several apis but after that I get this error:  
{  
“code”: 124,  
“message”: “Invalid access token.”  
}

Any tips?

Regards

---

<div class="post-metadata">

**Author:** ![elisa.zoom](https://sea2.discourse-cdn.com/flex016/user_avatar/devforum.zoom.us/elisa.zoom/32/47836_2.png) [@elisa.zoom](https://devforum.zoom.us/u/elisa.zoom)\
**Post date:** [March 16, 2023, 6:05pm UTC](https://devforum.zoom.us/t/server-2-server-token-expiration-time/84813/2 "2023-03-16T18:05:22Z")

</div>

Hi @MarceloErthal  
This is not expected. Access tokens generated with the server to server oauth have an expiration time of 1 hour, but it is important to mention that every time you generate a new token, the previous one gets invalidated.  
Can you make sure you are not generating new ones that could be invalidating the one that you are using?

---

<div class="post-metadata">

**Author:** ![MarceloErthal](https://sea2.discourse-cdn.com/flex016/user_avatar/devforum.zoom.us/marceloerthal/32/46461_2.png) [@MarceloErthal](https://devforum.zoom.us/u/MarceloErthal)\
**Post date:** [March 17, 2023, 1:11pm UTC](https://devforum.zoom.us/t/server-2-server-token-expiration-time/84813/3 "2023-03-17T13:11:07Z")

</div>

@elisa.zoom,

yes, I only generate the token one time when the process starts. What should I do?

---

<div class="post-metadata">

**Author:** ![elisa.zoom](https://sea2.discourse-cdn.com/flex016/user_avatar/devforum.zoom.us/elisa.zoom/32/47836_2.png) [@elisa.zoom](https://devforum.zoom.us/u/elisa.zoom)\
**Post date:** [March 17, 2023, 3:00pm UTC](https://devforum.zoom.us/t/server-2-server-token-expiration-time/84813/4 "2023-03-17T15:00:18Z")

</div>

@MarceloErthal  
Make sure that you generate a new token every time you are making a request or to use the same token for 1 hours, because creating a new one will invalidate the previous one.  
So I would suggest you to generate a token for each call that you want to make or to create different applications so you can have tokens working independently
