Can we set up multiple Redirect URLs?

Hi team,

Can we set up multiple Redirect URLs in one app? The reason we wanted to do this is our app has different domains/subdomains in different countries, and it would be super helpful if we can also set up the sandbox to work with different testing environments which each has its own domain.

Thank you.

1 Like

Hi @hx_developer welcome to the forums!

Unfortunately, at this time there is no way to set up multiple redirect urls for OAuth. I will update this to be a feature request so our PMs can see.

Assuming I understood your requirements, there is a possible work-around.

As part of the original authorization request, you can append state. That state is returned with the authorization code. The state could be used as a discriminator to redirect another domain/subdomain.

I haven’t tried this myself but this should work.

Hi Sjosey, Can you verify if Gary’s suggestion here could work? Can we set up multiple Redirect URLs? - #3 by Gary

Hi! Did you try Gary’s recommendation here? Can we set up multiple Redirect URLs? - #3 by Gary

You can definitely use the state parameter to pass some sort of “flag” (or whatever - it’s literally just a string value). On your backend, you could read the parameter, and redirect as needed on your own logic, sure!

We have different environments for development and testing. Is there a way to support all the environments?

I’d need to know a bit more about your different environments and how you intend to test to better answer this however there are quite a few options available to you for testing. :slightly_smiling_face:

We are using different environments
Development localhost:[PORT_NUMBER]

Okay, great! With our sandbox you can test various scenario’s before moving to production. :slightly_smiling_face:

Can we add multiple Redirect URLs to one app, considering we use different domains for different countries?

Unfortunately, configuring multiple redirect URLs isn’t currently possible. We’re constantly working to improve our features based on feedback like this, so I’ll be sure to share your request to the API product team. :slightly_smiling_face:

1 Like

thank you for your help… bryan :+1: