cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
Announcements
Want to learn some quick and useful tips to make your day easier? Check out how Calvin uses Replay to get feedback from other teams at Dropbox 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: 

No Redirect URI

No Redirect URI

aishwarya k.
Explorer | Level 3

I am new to oAuth 2.0. I have read that a redirect URI is neccessary for an implict flow authentication and authorization.

 

However, I have registered my Android app in Dropbox app console and have not provided a redirect URI. Still, apps user can authorize app and the app obtains an access token and everything works fine.

 

If redirect URI is blank, how is this all working ?? Does dropbox android sdk  com.dropbox.core:dropbox-core-sdk:2.1.1 fills in a default with something like http://localhost ?  

 

Please explain this. I am very much confused on this point.

3 Replies 3

Greg-DB
Dropbox Staff

You're correct that the OAuth 2 implicit flow requires a redirect URI. When using the API v2 Java SDK in an Android app, the SDK automatically uses a local redirect URI, based on your app key.

 

You can see how this works in the code:

 

https://github.com/dropbox/dropbox-sdk-java/blob/7ecc15cf0f51d6ae2ba5cdb334aac2c2f3474b87/src/main/j...

https://github.com/dropbox/dropbox-sdk-java/blob/7ecc15cf0f51d6ae2ba5cdb334aac2c2f3474b87/src/main/j...
https://github.com/dropbox/dropbox-sdk-java/blob/7ecc15cf0f51d6ae2ba5cdb334aac2c2f3474b87/src/main/j...

aishwarya k.
Explorer | Level 3
Hi Greg, Thanks for the reply. I have looked earlier also at the codes you mentioned, but couldn't find any reference to redirect URI there (as a default or anything). What am I missing here? Regards, Aish

Greg-DB
Dropbox Staff

The SDK uses a default URI, so it doesn't need to be explicitly provided. My third link shows where the SDK checks that the app is registered for the default URI though (db-<app_key>).

Need more support?
Who's talking

Top contributors to this post

  • User avatar
    Greg-DB Dropbox Staff
  • User avatar
    aishwarya k. Explorer | Level 3
What do Dropbox user levels mean?