cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
Announcements
We're looking to hear about your experience when using Dropbox in a web browser. What parts of Dropbox feels very slow to you and takes a lot of time to get done? What are you trying to do in the Dropbox web browser when you experience slowness? Tell us 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: 
1
Ask
2
Reply and help

OAuth2 response

OAuth2 response

IQCloud
Explorer | Level 3

Hello,

           when we access the auth 2 authorization interface at:

https://api.dropbox.com/1/oauth2/authorize?response_type=code&client_id=zzzzzzz&redirect_uri=https:/...

 

          If the authentication is successful and user has accepted that my app can access their files,

               it then invoke https://localhost:4433/Test with the Code parameter and token info.

               From there, we do not know which user has just accepted our app.

               Is there anyway to have drop box invoke https://localhost:4433 and add the user id or anything to identify the user?

 

Please let me know!

Thanks

 

1 Reply 1

Re: OAuth2 response

Greg-DB
Dropboxer

You're using the "code" flow here, which means that you'll get an "authorization code" back on your redirect URI. You should then exchange that authorization code for an "access token" by calling /oauth2/token. The /oauth2/token endpoint's response will include the 'account_id' for the user account that authorized the app. You can also call /2/users/get_current_account with an access token to check what account the access token is for.

 

Also, note that per the documentation, the app authorization page should be accessed at https://www.dropbox.com/oauth2/authorize (not on api.dropbox.com).

Who's talking

Top contributors to this post

  • User avatar
    Greg-DB Dropboxer
What do Dropbox user levels mean?
Need more support?