cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
Announcements
Back again with another edition of 'How we use Dropbox', so find out how Emma uses to-do lists to get it all done 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

Re: No Redirect URI

Greg-DB
Dropboxer

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...

Re: No Redirect URI

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

Re: No Redirect URI

Greg-DB
Dropboxer

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>).

Poll
We love to learn from the educators who use Dropbox. Whether you teach kids, teens, adults or a combination of all three, we want to know what apps and integrations you use with Dropbox to help with teaching. Which of the ones below is your favorite, or most used tool?
Who's talking

Top contributors to this post

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