cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
Announcements
Find out how Tiffany, a Customer Experience superstar uses Dropbox to keep her family in the loop when it comes to her new baby here!

Discuss Dropbox Developer & API

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Login into dropbox without redirect-uri

Login into dropbox without redirect-uri

ntnvrma
Explorer | Level 4

I am using "/oauth2/authorize?response_type=code&client_id=<clientid>&state=<randomstring>"  url and converted it into QR code and display to user.

User then scan the QR Code from  smart phone and login through smartphone. After entering credentials , I am getting follwing message on smartphone

 

Enter this code into <app_name> to finish the process.

<*******************************>

 

Is there a way to generate the access token using this authorization code apart from manually pasting it tp "/token" url ?

 

Any help would be appreciated.

3 Replies 3

Re: Login into dropbox without redirect-uri

Greg-DB
Dropboxer

When using the OAuth 2 code flow like this, using the /oauth2/token endpoint to exchange the authorization code for an access token is the correct and only way to get an access token.

 

Exactly how you get that authorization code value to the client where you need to make the /oauth2/token call can vary though. As you currently have it, you can have the user manually copy/paste or type the authorization code to the client. Alternatively, the only other way to automate this would be to use a redirect URI in the 'redirect_uri' parameter passed to /oauth2/authorize. If you can't use a redirect URI for some reason, you will need to have the user do this manually.

Re: Login into dropbox without redirect-uri

ntnvrma
Explorer | Level 4

I understand your point, but in my current scenario: my authorization code is displayed on my smartphone and my desktop application needs access token.

manually entering the code ...works  fine.

Just wanted to know , if there's any other way to automate the OAuth without having the redirect_uri. 

 

Appreciate your response 🙂

 

 

Re: Login into dropbox without redirect-uri

Greg-DB
Dropboxer

Thanks for the information. Unfortunately the redirect URI functionality is the only way Dropbox offers to automate this.

Who's talking

Top contributors to this post

  • User avatar
    Greg-DB Dropboxer
  • User avatar
    ntnvrma Explorer | Level 4
What do Dropbox user levels mean?
Need more support?