# Node.js Zoom API: invalid authorization code

**URL:** <https://devforum.zoom.us/t/node-js-zoom-api-invalid-authorization-code/55937>\
**Category:** API and Webhooks\
**Created:** [August 17, 2021, 1:39pm UTC](https://devforum.zoom.us/t/node-js-zoom-api-invalid-authorization-code/55937 "2021-08-17T13:39:49Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![orassayag](https://sea2.discourse-cdn.com/flex016/user_avatar/devforum.zoom.us/orassayag/32/30554_2.png) [@orassayag](https://devforum.zoom.us/u/orassayag)\
**Post date:** [August 17, 2021, 1:39pm UTC](https://devforum.zoom.us/t/node-js-zoom-api-invalid-authorization-code/55937/1 "2021-08-17T13:39:50Z")

</div>

## Using this template helps us debug your issues more effectively 🙂

**Description**  
0

I have an application that I use to connect the user to the Zoom MarketPlace, according to this guide: [https://marketplace.zoom.us/docs/guides/auth/oauth](https://marketplace.zoom.us/docs/guides/auth/oauth)  
After the user redirect back to my page, and I do the installation, everything works OK. The problem is, when the user click on the Connect button, redirect back to my page with “code” parameter in the query string, wait about 10 minutes, and only then try to install the Zoom on the server: I get the following error: “error: invalid\_request, reason: Invalid authorization code”.  
I don’t see anything related to any expiration time of the “code” parameter in the query string inside the Zoom documentation.

**Error**  
“error: invalid\_request, reason: Invalid authorization code”.

Does the “code” parameter returned from the Zoom Callback has expiration time?  
Thanks!

 ![zoom-bug](https://us1.discourse-cdn.com/flex016/uploads/zoomdeveloper/original/3X/4/5/45d10e1f21ff1c5253b320a9d573302f6ed635e6.png)

---

<div class="post-metadata">

**Author:** ![MaxM](https://sea2.discourse-cdn.com/flex016/user_avatar/devforum.zoom.us/maxm/32/42303_2.png) [@MaxM](https://devforum.zoom.us/u/MaxM)\
**Post date:** [August 21, 2021, 12:04am UTC](https://devforum.zoom.us/t/node-js-zoom-api-invalid-authorization-code/55937/2 "2021-08-21T00:04:05Z")

</div>

Hey @orassayag,

Thank you for reaching out to the Zoom Developer Forum. I’ve reached out to our engineering team to confirm the behavior here. I’ll let you know when I hear back from them.

(ZOOM-301744)

Thanks,  
Max

---

<div class="post-metadata">

**Author:** ![orassayag](https://sea2.discourse-cdn.com/flex016/user_avatar/devforum.zoom.us/orassayag/32/30554_2.png) [@orassayag](https://devforum.zoom.us/u/orassayag)\
**Post date:** [September 17, 2021, 8:50am UTC](https://devforum.zoom.us/t/node-js-zoom-api-invalid-authorization-code/55937/3 "2021-09-17T08:50:30Z")

</div>

Hi, it’s been a month since I asked the question, is there any developments? thanks.

---

<div class="post-metadata">

**Author:** ![MaxM](https://sea2.discourse-cdn.com/flex016/user_avatar/devforum.zoom.us/maxm/32/42303_2.png) [@MaxM](https://devforum.zoom.us/u/MaxM)\
**Post date:** [September 21, 2021, 8:17pm UTC](https://devforum.zoom.us/t/node-js-zoom-api-invalid-authorization-code/55937/4 "2021-09-21T20:17:52Z")

</div>

Hey @orassayag,

My apologies for the delay here, the authorization code will expire in 5 minutes which is why you’re seeing this issue after a 10 minute delay.

Let me know if that helps.

Thanks,  
Max

---

<div class="post-metadata">

**Author:** ![orassayag](https://sea2.discourse-cdn.com/flex016/user_avatar/devforum.zoom.us/orassayag/32/30554_2.png) [@orassayag](https://devforum.zoom.us/u/orassayag)\
**Post date:** [September 25, 2021, 7:40am UTC](https://devforum.zoom.us/t/node-js-zoom-api-invalid-authorization-code/55937/5 "2021-09-25T07:40:26Z")

</div>

Thanks for the reply, I would suggest adding this information in your documentation. Either way I changed the logic to fetch the token immediately when redirected back. Thanks for the help!

---

<div class="post-metadata">

**Author:** ![MaxM](https://sea2.discourse-cdn.com/flex016/user_avatar/devforum.zoom.us/maxm/32/42303_2.png) [@MaxM](https://devforum.zoom.us/u/MaxM)\
**Post date:** [September 28, 2021, 9:05pm UTC](https://devforum.zoom.us/t/node-js-zoom-api-invalid-authorization-code/55937/6 "2021-09-28T21:05:01Z")

</div>

Hey @orassayag,

Good call, I’ll see if we can get this added to our documentation.

Thanks,  
Max

---

<div class="post-metadata">

**Author:** ![MaxM](https://sea2.discourse-cdn.com/flex016/user_avatar/devforum.zoom.us/maxm/32/42303_2.png) [@MaxM](https://devforum.zoom.us/u/MaxM)\
**Post date:** [September 28, 2021, 9:05pm UTC](https://devforum.zoom.us/t/node-js-zoom-api-invalid-authorization-code/55937/7 "2021-09-28T21:05:08Z")

</div>

Closed on September 28, 2021, 9:05pm UTC


