# Invalid redirect url (4700) when whitelisting root domain on production sites

**URL:** <https://devforum.zoom.us/t/invalid-redirect-url-4700-when-whitelisting-root-domain-on-production-sites/32693>\
**Category:** API and Webhooks\
**Created:** [October 9, 2020, 12:36am UTC](https://devforum.zoom.us/t/invalid-redirect-url-4700-when-whitelisting-root-domain-on-production-sites/32693 "2020-10-09T00:36:01Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![trista.wang](https://avatars.discourse-cdn.com/v4/letter/t/eada6e/32.png) [@trista.wang](https://devforum.zoom.us/u/trista.wang)\
**Post date:** [October 9, 2020, 12:36am UTC](https://devforum.zoom.us/t/invalid-redirect-url-4700-when-whitelisting-root-domain-on-production-sites/32693/1 "2020-10-09T00:36:01Z")

</div>

Hi,  
I have an app( called Xplan) that uses OAuth authorization and it is deployed to multiple servers. Each instance of the app has its own subdomain.

There are over a thousand such subdomains, and it is not a static list. When a user on a site tries to authorize, the redirect url will be specific to that site, something like “[https://subdomain1.topdomain.com/redirect”](https://subdomain1.topdomain.com/redirect%E2%80%9D). Adding just “[https://topdomain.com](https://topdomain.com/)” to the whitelist was enough for OAuth redirection, and it works for our test sites. But today I tried to test on our production sites I’m getting “invalid redirect url” when a user tries to authorize the app unless I give the full domain in the whitelist. That means adding each subdomain separately which is not feasible.

We raised this issue before for test sites and it has been fixed, but now it happens again for our production sites.

Could you help with this issue? This is impacting our app submission and release.

Cheers  
Trista

---

<div class="post-metadata">

**Author:** ![will.zoom](https://sea2.discourse-cdn.com/flex016/user_avatar/devforum.zoom.us/will.zoom/32/14417_2.png) [@will.zoom](https://devforum.zoom.us/u/will.zoom)\
**Post date:** [October 9, 2020, 7:47pm UTC](https://devforum.zoom.us/t/invalid-redirect-url-4700-when-whitelisting-root-domain-on-production-sites/32693/2 "2020-10-09T19:47:26Z")

</div>

Hi @trista.wang,

Thanks for reaching out, and happy to help take a closer look at this for you.

Is it possible to share a screenshot of your production default Redirect URL and Whitelist URLs with me here? In the meantime, could you also ensure that you have the “[https://topdomain.com](https://topdomain.com/)” as your production redirect URL in your app in the marketplace?

If you have a chance, please also check out this thread:

> [@Does zoom support more than two environments for oauth2?](https://devforum.zoom.us/t/does-zoom-support-more-than-two-environments-for-oauth2/11052/12):
>
> Hey @tuancode, @michael.solomon, This is totally possible! slight_smile Let me walk you through how to do this with the base domain of example.com For your whitelist, simply add your base domain: https://example.com Then in your dev/prod redirect url field, add a default redirect, https://any.example.com (this will be programmatically overridden to the correct sub domain, continue reading below) Now, with your install URL ([the url mentioned in Step 1. of the OAuth guide](https://marketplace.zoom.us/docs/guides/auth/oauth#getting-access-token)) in your code, dyna…

Thanks!  
Will

---

<div class="post-metadata">

**Author:** ![trista.wang](https://avatars.discourse-cdn.com/v4/letter/t/eada6e/32.png) [@trista.wang](https://devforum.zoom.us/u/trista.wang)\
**Post date:** [October 14, 2020, 5:18am UTC](https://devforum.zoom.us/t/invalid-redirect-url-4700-when-whitelisting-root-domain-on-production-sites/32693/3 "2020-10-14T05:18:49Z")

</div>

Hi, will,  
Thanks for the information, yes, we are following what you mentioned here. But even we did not change anything, we now don’t have the 4700 error. Thanks for your help.

---

<div class="post-metadata">

**Author:** ![will.zoom](https://sea2.discourse-cdn.com/flex016/user_avatar/devforum.zoom.us/will.zoom/32/14417_2.png) [@will.zoom](https://devforum.zoom.us/u/will.zoom)\
**Post date:** [October 14, 2020, 6:03pm UTC](https://devforum.zoom.us/t/invalid-redirect-url-4700-when-whitelisting-root-domain-on-production-sites/32693/4 "2020-10-14T18:03:58Z")

</div>

Hi @trista.wang,

Ah, I see! I’m glad to hear it’s working now. 🙂

Best,  
Will

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/flex016/uploads/zoomdeveloper/original/3X/6/1/614bdd549b610bbaa46ff934617683a02bdaa03c.png) [@system](https://devforum.zoom.us/u/system)\
**Post date:** [November 14, 2020, 4:04am UTC](https://devforum.zoom.us/t/invalid-redirect-url-4700-when-whitelisting-root-domain-on-production-sites/32693/5 "2020-11-14T04:04:02Z")

</div>

Closed on November 14, 2020, 4:04am UTC

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.
