# Zoom-oauth-sample-app-master failed to get code

**URL:** <https://devforum.zoom.us/t/zoom-oauth-sample-app-master-failed-to-get-code/7758>\
**Category:** API and Webhooks\
**Created:** [January 29, 2020, 4:25am UTC](https://devforum.zoom.us/t/zoom-oauth-sample-app-master-failed-to-get-code/7758 "2020-01-29T04:25:13Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![li-jie.yin](https://avatars.discourse-cdn.com/v4/letter/l/ce7236/32.png) [@li-jie.yin](https://devforum.zoom.us/u/li-jie.yin)\
**Post date:** [January 29, 2020, 4:25am UTC](https://devforum.zoom.us/t/zoom-oauth-sample-app-master-failed-to-get-code/7758/1 "2020-01-29T04:25:13Z")

</div>

**Description**  
Hi I followed the instruction listed in zoom-oauth-sample-app-master, i.e. updated config.js with valid clientID, clientSecret and redirectUrl (Please note that I only have one set of clientID and clientSecret in the created OAuth application)  
After execute

> node index.js

Then type in browser: ‘localhost:3000’  
It redirects to redirectUrl with code=xxxx, such as

> **[Communications & Payment Systems Management Solutions | IR](https://www.ir.com/?code=8.....xg)**
>
> Monitor, troubleshoot, and optimize critical systems for enterprise communications, collaboration, and payment systems.

The code returned can be used to get access token later if and only if I am currently logging in to zoom.

Quite sure that this line  
_**if (req.query.code)**_  
return false.

If I am not currently logging in zoom now, I got “You cannot authorize the app” error.

Can some one please tell me how to make this sample code works?

---

<div class="post-metadata">

**Author:** ![tommy](https://sea2.discourse-cdn.com/flex016/user_avatar/devforum.zoom.us/tommy/32/72769_2.png) [@tommy](https://devforum.zoom.us/u/tommy)\
**Post date:** [January 29, 2020, 5:43pm UTC](https://devforum.zoom.us/t/zoom-oauth-sample-app-master-failed-to-get-code/7758/2 "2020-01-29T17:43:40Z")

</div>

Hey @li-jie.yin,

Can you show a full screenshot of the “You cannot authorize the app” error?

I think it is related to your user permissions.

Thanks,  
Tommy

---

<div class="post-metadata">

**Author:** ![DeveloperBot](https://sea2.discourse-cdn.com/flex016/user_avatar/devforum.zoom.us/developerbot/32/12632_2.png) [@DeveloperBot](https://devforum.zoom.us/u/DeveloperBot)\
**Post date:** [August 21, 2020, 7:13pm UTC](https://devforum.zoom.us/t/zoom-oauth-sample-app-master-failed-to-get-code/7758/3 "2020-08-21T19:13:40Z")

</div>

Closed on August 21, 2020, 7:13pm UTC


