You might see that the Dropbox Community team have been busy working on some major updates to the Community itself! So, here is some info on what’s changed, what’s staying the same and what you can expect from the Dropbox Community overall.
Forum Discussion
Jaihoon_Ahn
8 years agoExplorer | Level 3
How do I set the Redirect URI port number?
Dropbox You have configured a Redirect URI for OAuth2 authentication. - http://127.0.0.1 - http://127.0.0.1:port I have coded the following code in C #. ------------------------------------...
Greg-DB
8 years agoDropbox Staff
You can use an OAuth 2 redirect URI including a port number, but it will still need to exactly match one of the OAuth 2 redirect URIs that you previously registered, including the port and path. If they don't match exactly, you'll get the error above.
So, first register the exact OAuth 2 redirect URI on the App Console (using the port number, not the string "port") and then use that exact string in the redirect_uri URL parameter.
For example, you're passing "http://127.0.0.1:56207" as the redirect_uri value, so you'll need to register "http://127.0.0.1:56207" exactly on the App Console.
I just tried this and it is working properly for me. If it's not working for you, please share a screenshot of the OAuth 2 redirect URIs registered for your app on the App Console as well as a screenshot of the error page you're getting, including the full URL.
- Jaihoon_Ahn8 years agoExplorer | Level 3
Answer Well received.
When the fixed port number is used according to the reply contents, it works correctly.Fixing the port number is probably a problem.
You specified port 56207 in the app console as 'http://127.0.0.1:56207'.
OAuth2 authentication is expected to fail if the 56207 port is blocked on the PC or another application is preempting it.So, when redirecting to Localhost, I want to specify port number which is not used in PC.
I know that 'Google' is not limited to Localhost.- Greg-DB8 years agoDropbox StaffYou can choose whatever redirect URI/port you want, but whatever you do choose, you need to pre-register it on the App Console.
- Jaihoon_Ahn8 years agoExplorer | Level 3
Additional questions.
Let's try randomly selecting the port number from "50000 ~ 51000".AppConsole settings should add 1000 or more as below.
http://127.0.0.1:50000
http://127.0.0.1:50001
http://127.0.0.1:50002
http://127.0.0.1:50003
... more ... more ...
http://127.0.0.1:50998
http://127.0.0.1:50999
http://127.0.0.1:51000
Is there a limit to the number of Redirect URIs that can be set in AppConsole?
- rshvets7 years agoNew member | Level 2
yes, fixed port number is really a headache.
And you are right about Google. For some reason Dropbox limits their redirect URIs when Google allows to define that URI dynamically.
Instead of letting my web server find out which port is available I have to loop over fixed number of ports and try to run that server using first avaialble port. It is really uncomfortable.
About Dropbox API Support & Feedback
Find help with the Dropbox API from other developers.
5,883 PostsLatest Activity: 17 minutes agoIf you need more help you can view your support options (expected response time for an email or ticket is 24 hours), or contact us on X or Facebook.
For more info on available support options for your Dropbox plan, see this article.
If you found the answer to your question in this Community thread, please 'like' the post to say thanks and to let us know it was useful!