# Meeting SDK - Zoom OAuth Code Expiration and how it affects Request Access Token

**URL:** <https://devforum.zoom.us/t/meeting-sdk-zoom-oauth-code-expiration-and-how-it-affects-request-access-token/78008>\
**Category:** Meeting SDK\
**Tags:** oauth, meeting-sdk\
**Created:** [October 28, 2022, 12:40am UTC](https://devforum.zoom.us/t/meeting-sdk-zoom-oauth-code-expiration-and-how-it-affects-request-access-token/78008 "2022-10-28T00:40:14Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![diegoroberto](https://sea2.discourse-cdn.com/flex016/user_avatar/devforum.zoom.us/diegoroberto/32/30417_2.png) [@diegoroberto](https://devforum.zoom.us/u/diegoroberto)\
**Post date:** [October 28, 2022, 12:40am UTC](https://devforum.zoom.us/t/meeting-sdk-zoom-oauth-code-expiration-and-how-it-affects-request-access-token/78008/1 "2022-10-28T00:40:14Z")

</div>

### Format Your New Topic as Follows:

**Meeting SDK Type and Version**  
\*Zoom SDK Version: 2.8.0

**Description**  
I’m using Zoom API at a NodeJS project so I can create meetings from my own application, but with the transition from JWT to SDK something appeared.  
When I applied the OAuth this returns me a code  
This code I can use it to request my access token and with this create my Meeting through the API.

The issue is that this access token expires at 1 hour, I can refresh it by using the Refresh Access Token but if I don’t refresh it at 1 hour then my access token and refresh token expires.

And when I tried to Request a new one using the same code that I obtained from the previous OAuth request I get the next response:

{  
“reason”: “Invalid authorization code”,  
“error”: “invalid\_grant”  
}

So the code expires too after 1 hour?  
And if is that the case how can I request a new Access Token without make the OAuth request again because I do that at my Postman, but at the Backend Nodejs I can’t.

**Error?**  
After 1 hour OAuth obtained code is Invalid so can’t request new Access Token

**How To Reproduce**  
_Steps to reproduce the behavior including:_  
\*1. Get Code from OAuth Request  
\*2. Request Access Token (optional)  
\*3. Wait 1 hour without Refresh the Access Token  
\*4. Try to Request the Access Token Again  
\*5. Obtained the error

---

<div class="post-metadata">

**Author:** ![donte.zoom](https://sea2.discourse-cdn.com/flex016/user_avatar/devforum.zoom.us/donte.zoom/32/24412_2.png) [@donte.zoom](https://devforum.zoom.us/u/donte.zoom)\
**Post date:** [November 4, 2022, 9:33pm UTC](https://devforum.zoom.us/t/meeting-sdk-zoom-oauth-code-expiration-and-how-it-affects-request-access-token/78008/2 "2022-11-04T21:33:14Z")

</div>

> [@diegoroberto](#):
>
> And when I tried to Request a new one using the same code that I obtained from the previous OAuth request I get the next response:

Thank you for posting in the Developer Forum. When you say `same code` what code are you referring to? Access token or Refresh Access Token

Also, we have a sample OAuth app you can reference. I’ve liked it below for you:

# Zoom OAuth Hello World

> **[GitHub - zoom/zoom-oauth-sample-app: Sample Zoom Oauth App NodeJS app to call Zoom's...](https://github.com/zoom/zoom-oauth-sample-app)**
>
> Sample Zoom Oauth App NodeJS app to call Zoom's APIs

> [@diegoroberto](#):
>
> And if is that the case how can I request a new Access Token without make the OAuth request again because I do that at my Postman, but at the Backend Nodejs I can’t.

Have you considered leveraging the sever-to-server OAuth app? With this approach, you can make a request to get an access token without having to do the two-step OAuth request dance. To this point, here are several sample OAuth apps you can reference :

# S2S OAuth Starter App

> **[GitHub - zoom/server-to-server-oauth-starter-api: Starting point for developing a Zoom S2S OAuth API](https://github.com/zoom/server-to-server-oauth-starter-api)**
>
> Starting point for developing a Zoom S2S OAuth API

# Zoom Server-to-Server (s2s) Oauth Token Generation

> **[GitHub - zoom/server-to-server-oauth-token: Utility script to generate a Zoom Server-to-Server...](https://github.com/zoom/server-to-server-oauth-token)**
>
> Utility script to generate a Zoom Server-to-Server Oauth Token and copy to clipboard
