cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
Announcements
Want to know what we learned at IBC? Check out our learnings on media, remote working and more right here.

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: 

moblie app using /oauth2/authorize interface redirect_uri problem

moblie app using /oauth2/authorize interface redirect_uri problem

chelizi
Helpful | Level 5
Go to solution

     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?

1 Accepted Solution

Accepted Solutions

Greg-DB
Dropbox Staff
Go to solution

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.

View solution in original post

4 Replies 4

Greg-DB
Dropbox Staff
Go to solution

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?

chelizi
Helpful | Level 5
Go to solution

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

 

Greg-DB
Dropbox Staff
Go to solution

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.

chelizi
Helpful | Level 5
Go to solution

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.

Need more support?
Who's talking

Top contributors to this post

  • User avatar
    chelizi Helpful | Level 5
  • User avatar
    Greg-DB Dropbox Staff
What do Dropbox user levels mean?