# OAuth with zoom - redirect uri is not used for redirect

**URL:** <https://devforum.zoom.us/t/oauth-with-zoom-redirect-uri-is-not-used-for-redirect/4843>\
**Category:** API and Webhooks\
**Created:** [July 2, 2019, 2:18pm UTC](https://devforum.zoom.us/t/oauth-with-zoom-redirect-uri-is-not-used-for-redirect/4843 "2019-07-02T14:18:56Z")\
**Posts on this page:** 11\
**Page:** 1

<div class="post-metadata">

**Author:** ![ohagen](https://avatars.discourse-cdn.com/v4/letter/o/65b543/32.png) [@ohagen](https://devforum.zoom.us/u/ohagen)\
**Post date:** [July 2, 2019, 2:18pm UTC](https://devforum.zoom.us/t/oauth-with-zoom-redirect-uri-is-not-used-for-redirect/4843/1 "2019-07-02T14:18:56Z")

</div>

Hi, I’m currently working on an OAuth application with Zoom. Here the error occurs that the redirect Uri I specified is not accepted, but I am sent back to the zoom page.

My Request URL: [https://zoom.us/oauth/authorize?client\_id=XXX&response\_type=code&redirect\_uri=http://localhost:8080/vccfg/login/oauth2/code/zoom&state=XXX](https://zoom.us/oauth/authorize?client_id=XXX&response_type=code&redirect_uri=http://localhost:8080/vccfg/login/oauth2/code/zoom&state=XXX)

Location I get send to after the request: [http://zoom.us/vccfg/login/oauth2/code/zoom?code=XXX](http://zoom.us/vccfg/login/oauth2/code/zoom?code=XXX)

Screenshot from my browser:

 ![Zoom%20OAuth%20Redirect%20Browser%20Screenshot](https://us1.discourse-cdn.com/flex016/uploads/zoomdeveloper/original/2X/4/4e91fe7933580e764d489056a52e9650b8d082c3.png)

The error only occurs when using “localhost:8080/vccfg/login/oauth2/code/zoom” as redirect uri. As soon as an external redirect uri like “XXX.xxx/vccfg/login/oauth2/code/zoom” is used the redirect works correctly.

Is there an explanation or solution for this behavior?

---

<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:** [July 2, 2019, 5:57pm UTC](https://devforum.zoom.us/t/oauth-with-zoom-redirect-uri-is-not-used-for-redirect/4843/2 "2019-07-02T17:57:19Z")

</div>

Hey @ohagen,

This thread may help you.

> [@Zoom Application Wrong redirect](https://devforum.zoom.us/t/zoom-application-wrong-redirect/4402/5):
>
> Hey @subhan, This issue only happens with localhost urls. To solve this you could use [https://ngrok.com/](https://ngrok.com/) to turn your localhost server into a free server with a url, and replace the localhost redirect url with the ngrok url. Instead of [http://localhost:8080/api/v1/zoom/complete-oauth](http://localhost:8080/api/v1/zoom/complete-oauth) it would be [https://d4c4477b.ngrok.io/api/v1/zoom/complete-oauth](https://d4c4477b.ngrok.io/api/v1/zoom/complete-oauth) This way you can still develop and test locally and have your redirect url work! Let me know if this helps!

---

<div class="post-metadata">

**Author:** ![ohagen](https://avatars.discourse-cdn.com/v4/letter/o/65b543/32.png) [@ohagen](https://devforum.zoom.us/u/ohagen)\
**Post date:** [July 3, 2019, 10:58am UTC](https://devforum.zoom.us/t/oauth-with-zoom-redirect-uri-is-not-used-for-redirect/4843/3 "2019-07-03T10:58:06Z")

</div>

Hi @tommy,

thanks for the reference.

I could solve the problem by replacing localhost:8080 with 127.0.0.1:8080.

---

<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:** [July 3, 2019, 3:52pm UTC](https://devforum.zoom.us/t/oauth-with-zoom-redirect-uri-is-not-used-for-redirect/4843/4 "2019-07-03T15:52:30Z")

</div>

Hey @ohagen,

Happy to help!

Does that solution work for you?

---

<div class="post-metadata">

**Author:** ![ekotanjyan](https://sea2.discourse-cdn.com/flex016/user_avatar/devforum.zoom.us/ekotanjyan/32/7364_2.png) [@ekotanjyan](https://devforum.zoom.us/u/ekotanjyan)\
**Post date:** [April 30, 2020, 2:51pm UTC](https://devforum.zoom.us/t/oauth-with-zoom-redirect-uri-is-not-used-for-redirect/4843/5 "2020-04-30T14:51:14Z")

</div>

I used ngrok , but this didnt helped

---

<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:** [May 5, 2020, 5:30pm UTC](https://devforum.zoom.us/t/oauth-with-zoom-redirect-uri-is-not-used-for-redirect/4843/6 "2020-05-05T17:30:08Z")

</div>

Hey @ekotanjyan,

Please share details about your issue so I can help debug.

Thanks,  
Tommy

---

<div class="post-metadata">

**Author:** ![rmcbean](https://sea2.discourse-cdn.com/flex016/user_avatar/devforum.zoom.us/rmcbean/32/8062_2.png) [@rmcbean](https://devforum.zoom.us/u/rmcbean)\
**Post date:** [May 9, 2020, 2:42am UTC](https://devforum.zoom.us/t/oauth-with-zoom-redirect-uri-is-not-used-for-redirect/4843/7 "2020-05-09T02:42:25Z")

</div>

Hi @tommy

This solution for using ngrok does not work for me locally when setting up OAuth for a private application. I’m getting this error when I attempt step number 2 “Request Access Token” from marketplace oauth guide. I find it very odd I’m able to get through step 1 using the redirect\_uri value but now I get this error here. This is becoming frustrating to setup as I’m blocked by this I need to gain the user’s access token to continue on with integration feature I’m building for my job

Is there another solution to get around this as I need to complete step 2 of this Getting an Access Token in order to get the /me Context of the user who just authorized the application. below of app. Here’s a screenshot of url configuration. Please let me know if this correct or not.

 ![](https://us1.discourse-cdn.com/flex016/uploads/zoomdeveloper/original/2X/2/2fc1330ea26c45033136c6ab8ce82a03e48717ad.png)

Thanks in advance

---

<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:** [May 13, 2020, 11:22pm UTC](https://devforum.zoom.us/t/oauth-with-zoom-redirect-uri-is-not-used-for-redirect/4843/8 "2020-05-13T23:22:38Z")

</div>

Hey @rmcbean,

Can you please send me a screenshot of the error you see?

Also what is the name of this app so I can investigate? I don’t see any apps under your email.

Make sure you are also [including the redirect url in the step 2 request.](https://marketplace.zoom.us/docs/guides/auth/oauth#step-2-request-access-token)

Thanks,  
Tommy

---

<div class="post-metadata">

**Author:** ![andrii.vandakurov](https://avatars.discourse-cdn.com/v4/letter/a/e9bcb4/32.png) [@andrii.vandakurov](https://devforum.zoom.us/u/andrii.vandakurov)\
**Post date:** [May 31, 2020, 3:17pm UTC](https://devforum.zoom.us/t/oauth-with-zoom-redirect-uri-is-not-used-for-redirect/4843/9 "2020-05-31T15:17:33Z")

</div>

@tommy Hi,  
i have same problem - i can’t get Access Token.

here is my url  
`https://zoom.us/oauth/authorize?client_id=aSVzCaY4R8mNntB81cCd1A&response_type=code&redirect_uri=https%3A%2F%2Fzoomtest.ngrok.io%2Foauth`

This is server code

```auto
app.get("/oauth", async (req, res) => {
  const { code } = req.query;

  if (!code) {
    return res.status(400).send("Code where not provided");
  }  
  
  const token = Buffer.from(`${Client_ID}:${Client_Secret}`, "utf8").toString(
    "base64"
  );

  const response = await axios
    .post(`https://zoom.us/oauth/token`, null, {
      headers: {
        "Authorization": `Basic ${token}`        
      },
      params: {
        code: code,
        grant_type: "authorization_code",
        redirect_uri: "https://zoomtest.ngrok.io/auth",
      },
    })
    .catch((err) => {
      console.log(err);
    });
  res.send(`${Date.now()}`);
});

```

 ![Screen Shot 2020-05-31 at 6.14.52 PM](https://us1.discourse-cdn.com/flex016/uploads/zoomdeveloper/original/2X/7/779e664e7e7a99c1e3400de4c9b8f160b868315c.png)

White list urls

 ![Screen Shot 2020-05-31 at 6.10.51 PM](https://us1.discourse-cdn.com/flex016/uploads/zoomdeveloper/original/2X/1/1be1ca19517bc9e8e1613067a56ea53c66650db2.png)

and error that i get

 ![Screen Shot 2020-05-31 at 6.16.17 PM](https://us1.discourse-cdn.com/flex016/uploads/zoomdeveloper/original/2X/a/ade365f75833cfdc225747be609cf801684f6a3b.png)

---

<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:** [June 4, 2020, 4:23pm UTC](https://devforum.zoom.us/t/oauth-with-zoom-redirect-uri-is-not-used-for-redirect/4843/11 "2020-06-04T16:23:09Z")

</div>

Hey @andrii.vandakurov,

Can you try using the production version of the app (prod client id, secret, and redirect\_uri) and let me know if that works?

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, 9:52pm UTC](https://devforum.zoom.us/t/oauth-with-zoom-redirect-uri-is-not-used-for-redirect/4843/13 "2020-08-21T21:52:17Z")

</div>

Closed on August 21, 2020, 9:52pm UTC


