Dropbox API Support & Feedback
Find help with the Dropbox API from other developers.
We plan to use the HTTP interface instead of the Android SDK when connecting to the dropbox. There is a problem in using the redirect_uri parameter in /oauth2/authorize.
After the authentication is complete, we intend to redirect the app to continue subsequent operations. Now we can't go back to our app. After the authentication is complete, it is in the system browser. How can I redirect to the app?
Currently, I have not found an example of returning to the app after authentication. In the guide document ”The redirect_uri is optional with the code flow - if unspecified, the authorization code is displayed on dropbox.com for the user to copy and paste to your app.
This extra step is less convenient for end users, but appropriate for apps that cannot support a redirect.“
How do we skip this step, or how do we configure in the app to support redirect?
Yes, you can use the redirect_uri option for this. The redirect URI you supply doesn't actually need to be an HTML web page. You should use the PKCE option, and use a redirect URI that goes directly to your app, e.g., by using a custom URL scheme that you register for your app.
To redirect back to your app after the user authorizes the app, you should use the 'redirect_uri' parameter on /oauth2/authorize that you mentioned. I recommend referring to the /oauth2/authorize documentation and OAuth Guide for more information.
Can you elaborate on what you mean when you say "There is a problem in using the redirect_uri parameter in /oauth2/authorize"? What do you have so far, and what isn't working exactly?
We access /oauth2/authorize in the app. The system browser is displayed. After the authorization is successful, we needs to redirect to the HTML page written by the us and then start the app on the page. shows the process is app --> system browser --> HTML page --> app. In this scenario, the app is running in the background. Is there any way to return the app after the authorization is successful ? The entire process is as follows: app --> System browser authorization --> After the authorization is successful, back to app . Omit the HTML developed by us start the app page. @Greg-DB Thanks
Yes, you can use the redirect_uri option for this. The redirect URI you supply doesn't actually need to be an HTML web page. You should use the PKCE option, and use a redirect URI that goes directly to your app, e.g., by using a custom URL scheme that you register for your app.
thanks.
we used Custom URI scheme solved the problem. eg: com.example.app:redirect_uri_path. AppLink requires an HTML page to jump to start the app. However, the deeplink can directly start the app using the Custom URI scheme. The HTML page is omitted.
Hi there!
If you need more help you can view your support options (expected response time for a 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!