We are aware of the issue with the badge emails resending to everyone, we apologise for the inconvenience - learn more here.

Forum Discussion

TheSecurity's avatar
TheSecurity
New member | Level 2
2 years ago

API Redirect URI allow multiple ports on localhost

Hello,

 

I am developing an application that uses the Dropbox API. I would like the application to choose a port that is currently open on the device and based on that create User Authorization link for user to authorize this application.

 

I have not found the way whether/how it can be achieved because Redirect URIs seem like only accept the full URI - exact match.

 

Thank you for your help

  • Hi TheSecurity,

    You can register multiple URIs (actually only port can differs) and use whatever appropriate in every particular case. Usually trying 3 different sequential ports above 1000 is enough. It's pretty unlikely all be engaged at the same time. If such almost impossible situation happens (by any chance), just inform your user. Certainly the next try will be successful. 😉

    Hope this helps.

  • Hi TheSecurity,

    You can register multiple URIs (actually only port can differs) and use whatever appropriate in every particular case. Usually trying 3 different sequential ports above 1000 is enough. It's pretty unlikely all be engaged at the same time. If such almost impossible situation happens (by any chance), just inform your user. Certainly the next try will be successful. 😉

    Hope this helps.

    • TheSecurity's avatar
      TheSecurity
      New member | Level 2

      Hi there,

      Thanks for your advice. At first I was a bit sceptical about this idea. But after some research I agree that the likelihood of all 3 ports being used is quite low.

  • Greg-DB's avatar
    Greg-DB
    Icon for Dropbox Staff rankDropbox Staff

    TheSecurity That's correct, Dropbox requires OAuth 2 redirect URIs to be registered exactly, including the port, but I'll pass this along as a feature request. I can't promise if or when that might be implemented though.

     

    As Здравко noted though, you can instead register multiple redirect URIs to support multiple ports.

    • TheSecurity's avatar
      TheSecurity
      New member | Level 2

      Hi there,

      Thanks for the clarification. I would appreciate it if you could pass this on as a feature request.

About Dropbox API Support & Feedback

Node avatar for Dropbox API Support & Feedback

Find help with the Dropbox API from other developers.

5,877 PostsLatest Activity: 3 hours ago
325 Following

If 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!