# Second application instance throws 'The provided redirect\_uri is not in the list of allowed callback URLs' error

**URL:** <https://community.auth0.com/t/second-application-instance-throws-the-provided-redirect-uri-is-not-in-the-list-of-allowed-callback-urls-error/72214>\
**Category:** Get Help\
**Created:** [October 27, 2021, 11:25pm UTC](https://community.auth0.com/t/second-application-instance-throws-the-provided-redirect-uri-is-not-in-the-list-of-allowed-callback-urls-error/72214 "2021-10-27T23:25:02Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![aleksandar.kirilov](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/aleksandar.kirilov/32/13075_2.png) [@aleksandar.kirilov](https://community.auth0.com/u/aleksandar.kirilov)\
**Post date:** [October 27, 2021, 11:25pm UTC](https://community.auth0.com/t/second-application-instance-throws-the-provided-redirect-uri-is-not-in-the-list-of-allowed-callback-urls-error/72214/1 "2021-10-27T23:25:02Z")

</div>

Apologies if something like this already exists…I have searched multiple times and found nothing.  
website1 = ‘[https://website1.azurewebsites.net](https://website1.azurewebsites.net)’  
website2 = ‘[https://website2.azurewebsites.net](https://website2.azurewebsites.net)’  
Lets say I have an application at _website1_ with a client id of ‘abcde’. It has an api configured for it and it all works fine. The audience for this site is _website1_.

Now I want to have a separate application at in Auth0 with a new url _website2_ with a client id of ‘54321’ and a new api. All looks fine in Auth0. The audience will still be _website1_ as I understand from the docs. When I try to load the new application at _website2_, I’m getting a ‘The provided redirect\_uri is not in the list of allowed callback URLs’ error - I can see the redirect\_uri contains the clientid ‘abcde’ which suggests it’s pointing at the wrong application. What am I doing wrong?

---

<div class="post-metadata">

**Author:** ![Ale](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/ale/32/50860_2.png) [@Ale](https://community.auth0.com/u/Ale)\
**Post date:** [October 28, 2021, 1:54am UTC](https://community.auth0.com/t/second-application-instance-throws-the-provided-redirect-uri-is-not-in-the-list-of-allowed-callback-urls-error/72214/3 "2021-10-28T01:54:04Z")

</div>

Welcome to the Auth0 Community, @aleksandar.kirilov!

I can see two topics here. The first one would be questions regarding how to use APIs/audiences in Auth0 and the second is the actual error you are receiving: **The provided redirect\_uri is not in the list of allowed callback URLs**. I will start with the first one, which is represented by the quotes below:

> [@aleksandar.kirilov](#):
>
> Lets say I have an application at _website1_ with a client id of ‘abcde’. It has an api configured for it and it all works fine. The audience for this site is _website1_ .
> 
> Now I want to have a separate application at in Auth0 with a new url _website2_ with a client id of ‘54321’ and a new api. All looks fine in Auth0. The audience will still be _website1_ as I understand from the docs.

First of all, I want to clarify some things about what you’ve said above just in case they help:

> [@aleksandar.kirilov](#):
>
> The audience for this site is _website1_ .

Audiences are for APIs. Not for applications. They are configured when creating a new API as shown below. Also, is your API audience really website1? Is that your API endpoint? I would expect you to use a URL instead. In addition to that, the name is really unexpected. “website1” is related to a web application instead of to an actual API:

 ![image](https://global.discourse-cdn.com/auth0/original/3X/1/4/14bee056a5fd025ed72bb9c8c8a4b74149d5ac1b.png)

> [@aleksandar.kirilov](#):
>
> Now I want to have a separate application at in Auth0 with a new url _website2_ with a client id of ‘54321’ and a new api.

When you say you want a new application with a new API, what do you mean? Are you going to use a different API i.e. a new backend/custom API on your side? Otherwise, registering a new API on Auth0 is not needed. APIs on Auth0 represent a backend/API on your side.

> [@aleksandar.kirilov](#):
>
> The audience will still be _website1_ as I understand from the docs.

This question can have different answers depending on the architecture of your solution. What docs are you following? The audience will vary or stay the same depending on your use case. Actually, two different implementations can work, one having a single API and hence audience and another one having two or more APIs registered and hence audiences. It all depends on what your backend expects and how it is ultimately implemented. I suggest you read [Configure Logical API for Multiple APIs](https://auth0.com/docs/configure/apis/set-logical-api) in case you want to learn more about this topic.

Now, I will discuss the **The provided redirect\_uri is not in the list of allowed callback URLs** error:

> [@aleksandar.kirilov](#):
>
> When I try to load the new application at _website2_ , I’m getting a ‘The provided redirect\_uri is not in the list of allowed callback URLs’ error - I can see the redirect\_uri contains the clientid ‘abcde’ which suggests it’s pointing at the wrong application. What am I doing wrong?

First of all, I would like to clarify what the following sentence means:

> [@aleksandar.kirilov](#):
>
> When I try to load the new application at _website2_

What does this mean? Does this just mean that you have an application with client\_id: 54321 running on your domain: [https://website2.azurewebsites.net](https://website2.azurewebsites.net/)?

> [@aleksandar.kirilov](#):
>
> The provided redirect\_uri is not in the list of allowed callback URLs error

This error means that you are calling an endpoint (I’m assuming it is `/authorize` with a redirect\_uri that’s not included on your application’s Allowed Callback URLs list). You can choose what redirect\_uri is used when you call `/authorize` and you can add that URL via your application’s **Settings** tab → **Allowed Callback URLs** option.

> [@aleksandar.kirilov](#):
>
> I can see the redirect\_uri contains the clientid ‘abcde’ which suggests it’s pointing at the wrong application. What am I doing wrong?

You are the one who chose to use `abcde`. Why are you doing this? As I said in the previous item, you can choose what redirect\_uri is used when you call `/authorize`. Also, abcde is not an URL, it is the client\_id of the first application, which is clearly wrong.

I hope some of this helps.

---

<div class="post-metadata">

**Author:** ![aleksandar.kirilov](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/aleksandar.kirilov/32/13075_2.png) [@aleksandar.kirilov](https://community.auth0.com/u/aleksandar.kirilov)\
**Post date:** [October 28, 2021, 9:38am UTC](https://community.auth0.com/t/second-application-instance-throws-the-provided-redirect-uri-is-not-in-the-list-of-allowed-callback-urls-error/72214/4 "2021-10-28T09:38:26Z")

</div>

Hi Ali,

Thanks for getting back to me. Apologies with the explanation above - as a newbie I couldn’t add more than 2 links so for figured I could write anything and edit if needs be. I couldn’t work out how to edit so gave up.  
Your explanation did help me to understand how things hang together a lot better so thank you. Managed to solve my problem too…I have a deployment that uses config transforms so all the values are now being set correctly but was still complaining. Upon further investigation in turned out to be some hard-coding left in the frontend code for testing purposes.

Cheers

---

<div class="post-metadata">

**Author:** ![konrad.sopala](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/konrad.sopala/32/13516_2.png) [@konrad.sopala](https://community.auth0.com/u/konrad.sopala)\
**Post date:** [October 28, 2021, 1:18pm UTC](https://community.auth0.com/t/second-application-instance-throws-the-provided-redirect-uri-is-not-in-the-list-of-allowed-callback-urls-error/72214/5 "2021-10-28T13:18:55Z")

</div>

Ooohhh! Glad to hear that!

---

<div class="post-metadata">

**Author:** ![system](https://global.discourse-cdn.com/auth0/original/3X/b/5/b560f266932fcce5d57f09a6595bd50518cae3f3.jpeg) [@system](https://community.auth0.com/u/system)\
**Post date:** [November 12, 2021, 1:19pm UTC](https://community.auth0.com/t/second-application-instance-throws-the-provided-redirect-uri-is-not-in-the-list-of-allowed-callback-urls-error/72214/6 "2021-11-12T13:19:18Z")

</div>

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