# Invalid access token - Server-to-Server OAuth

**URL:** <https://devforum.zoom.us/t/invalid-access-token-server-to-server-oauth/76424>\
**Category:** Authentication\
**Created:** [September 23, 2022, 1:23am UTC](https://devforum.zoom.us/t/invalid-access-token-server-to-server-oauth/76424 "2022-09-23T01:23:44Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![r3c](https://avatars.discourse-cdn.com/v4/letter/r/cc9497/32.png) [@r3c](https://devforum.zoom.us/u/r3c)\
**Post date:** [September 23, 2022, 1:23am UTC](https://devforum.zoom.us/t/invalid-access-token-server-to-server-oauth/76424/1 "2022-09-23T01:23:44Z")

</div>

**API Endpoint(s) and/or Zoom API Event(s)**  
[https://api.zoom.us/v2/users/{user\_id}](https://api.zoom.us/v2/users/%7Buser_id%7D)

**Description**  
We have a [Server-to-Server OAuth app](https://marketplace.zoom.us/docs/guides/build/server-to-server-oauth-app/) that it’s returning the “Invalid access token” within the hour of being issued. We have even tried to use the token through postman getting the same response.

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

**How To Reproduce**

_Steps to reproduce the behavior:_  
\*1. [https://api.zoom.us/v2/users/{user\_id}](https://api.zoom.us/v2/users/%7Buser_id%7D)  
\*2. The request above was made within the valid time of the access token.

When decoding the token the issued at and expired at values were:

```json
exp: 1663897232,
iat: 1663893632

```

And the request time was 2022-09-22T21:06:13.983131

---

<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:** [September 26, 2022, 2:32pm UTC](https://devforum.zoom.us/t/invalid-access-token-server-to-server-oauth/76424/2 "2022-09-26T14:32:48Z")

</div>

Hi @r3c  
Thanks for reaching out to the Zoom Developer Forum, I am happy to help here!  
Could you please share with me how are you requesting the access token?  
Here is a very helpful post that I have create that might help you troubleshoot your issue:

> [@How to user Server-to-Sever OAuth app with Postman](https://devforum.zoom.us/t/how-to-user-server-to-sever-oauth-app-with-postman/70848):
>
> How to use our Server-to-Server OAuth with Postman? As some of you might be aware of, our JWT app is being deprecated by June 2023 and we encourage you to migrate to the newly introduced [Server-to-Server OAuth App](https://marketplace.zoom.us/docs/guides/build/server-to-server-oauth-app) That being said, here is a quick and simple guide on how to use or new app with Postman As stated in our documentation here: This new app type facilitates OAuth-authenticated requests between servers without end-user involvement. And this grant type enable your private server a…

Best,  
Elisa

---

<div class="post-metadata">

**Author:** ![r3c](https://avatars.discourse-cdn.com/v4/letter/r/cc9497/32.png) [@r3c](https://devforum.zoom.us/u/r3c)\
**Post date:** [September 26, 2022, 2:48pm UTC](https://devforum.zoom.us/t/invalid-access-token-server-to-server-oauth/76424/3 "2022-09-26T14:48:49Z")

</div>

Hi @elisa.zoom we are getting the token following the guide below:

> **[Create a Server-to-Server OAuth app](https://marketplace.zoom.us/docs/guides/build/server-to-server-oauth-app/#use-account-credentials-to-get-an-access-token)**
>
> The Zoom Developer Platform is an open platform that allows third-party developers to build applications and integrations upon Zoom’s video-first unified communications platform.

---

<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:** [September 26, 2022, 2:50pm UTC](https://devforum.zoom.us/t/invalid-access-token-server-to-server-oauth/76424/4 "2022-09-26T14:50:30Z")

</div>

could you share the request url that you are sending please @r3c

---

<div class="post-metadata">

**Author:** ![r3c](https://avatars.discourse-cdn.com/v4/letter/r/cc9497/32.png) [@r3c](https://devforum.zoom.us/u/r3c)\
**Post date:** [September 26, 2022, 8:21pm UTC](https://devforum.zoom.us/t/invalid-access-token-server-to-server-oauth/76424/5 "2022-09-26T20:21:29Z")

</div>

Hi @elisa.zoom do you mean the url we are using to get the tokens?

---

<div class="post-metadata">

**Author:** ![r3c](https://avatars.discourse-cdn.com/v4/letter/r/cc9497/32.png) [@r3c](https://devforum.zoom.us/u/r3c)\
**Post date:** [September 26, 2022, 8:28pm UTC](https://devforum.zoom.us/t/invalid-access-token-server-to-server-oauth/76424/6 "2022-09-26T20:28:17Z")

</div>

@elisa.zoom I think I found my exact problem [Randomly receiving "Invalid access token" for Server-to-Server OAuth](https://devforum.zoom.us/t/randomly-receiving-invalid-access-token-for-server-to-server-oauth/74432)

---

<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:** [September 27, 2022, 2:06pm UTC](https://devforum.zoom.us/t/invalid-access-token-server-to-server-oauth/76424/7 "2022-09-27T14:06:25Z")

</div>

Hi @r3c  
Have you been able to resolve this issue?  
And by the URL yes I mean the request that should look something like this:

[https://zoom.us/oauth/token?grant\_type=account\_credentials&account\_id={account\_ID}](https://zoom.us/oauth/token?grant_type=account_credentials&account_id=%7Baccount_ID%7D)
