cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
Announcements
Update: Find information on Dropbox support during COVID-19 here
Close

Dropbox API Support & Feedback

Find help with the Dropbox API from other developers.

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
Highlighted

OAuth Redirect URL doesn't allow Me to test it with subdomain

Explorer | Level 4
i facing issue invalid redirect url
i am having sub domin application.
my domain is tixio.io
and user has there own company and then they can login using there company name 
teamlance.tixio.io, teamlance is company name .. its dyanmic , so this is full url i am having and now i am passing this url in redirect url in my app. 
its working fine for me when i am passing full url but when i am trying it to another url like test.tixio.io its not working giveing invalid url please help me out for this.
 
and also i am testing it on local but same i am not able to login so please help me out with this.? what should be the url in redirect url ??
in locahost i using react js 
i am having johnsmith.localhost:3005/userdrive url or johnsmith.johnsmith.com:3005/userdrive 

so please help i will be vary thankful for this help
1 Accepted Solution

Accepted Solutions
Highlighted

Re: OAuth Redirect URL doesn't allow Me to test it with subdomain

Dropboxer
Dropboxer

The OAuth 2 spec requires that the redirect_uri values associated with an app be explicit.  This means you either need to include a separate redirect_uri for each subdomain, or use a single explicit one.  In scenarios like you describe where the subdomain is dynamic, we recommend encoding an identifier in the `state` parameter that will be returned as part of the OAuth redirect.  You can then use that same value to map the OAuth response to the appropriate subdmain.

If you are testing locally, you will want to use a redirect_uri that includes `localhost`.  This would be the URL domain in your browser window when testing locally.  Make sure your app configuration (accessible via https://www.dropbox.com/developers/apps ) has the localhost URL included in the `redirect_uri` list.

For more information on setting up your OAuth 2 flow, I recommend reading our OAuth guide.

View solution in original post

1 Reply 1
Highlighted

Re: OAuth Redirect URL doesn't allow Me to test it with subdomain

Dropboxer
Dropboxer

The OAuth 2 spec requires that the redirect_uri values associated with an app be explicit.  This means you either need to include a separate redirect_uri for each subdomain, or use a single explicit one.  In scenarios like you describe where the subdomain is dynamic, we recommend encoding an identifier in the `state` parameter that will be returned as part of the OAuth redirect.  You can then use that same value to map the OAuth response to the appropriate subdmain.

If you are testing locally, you will want to use a redirect_uri that includes `localhost`.  This would be the URL domain in your browser window when testing locally.  Make sure your app configuration (accessible via https://www.dropbox.com/developers/apps ) has the localhost URL included in the `redirect_uri` list.

For more information on setting up your OAuth 2 flow, I recommend reading our OAuth guide.

View solution in original post

Polls
Do you know how to organize your files and folders?
We have created a guide on folder best practice, so you can get organized now check it out here.

Work Smarter with Dropbox

The way we work is changing. Share and discover new ways to work smarter with Dropbox in our community.

Sound good? Let's get started.
Who's talking

Top contributors to this post

What do Dropbox user levels mean?
Need more support?