We Want to Hear From You! What Do You Want to See on the Community? Tell us here!
Forum Discussion
seizo
9 years agoHelpful | Level 6
How to find the present-log-in-account in the redirect_uri
I have a question about /oauth2/authorize end point.
Now I'm developing an Android app. The app sends a request to /oauth2/authorize end point. (response_type=token) I could confirm that the endp...
- 9 years agoIt's no problem!
The user can change accounts if they want before clicking "Allow". You may want to set force_reapprove=true though. Otherwise, Dropbox may automatically redirect them before that can do so. You can find more information on that parameter here:
https://www.dropbox.com/developers/documentation/http/documentation#oauth2-authorize
Greg-DB
Dropbox Community Moderator
9 years agoThe /oauth2/authorize web page itself shows the user which account they're currently logged in to in the drop down in the upper right corner of the page. They can also switch which account they're logged in to by signing out and in there, before authorizing the app.
seizo
9 years agoHelpful | Level 6
Thank you Greg for the kind explanation. <(_ _)>
When I use oauth2/authorize endpoint ...
with the parameter "response_type=code" and
without the parameter "redirect_uri=https://myWebpage.com"
I can get a code in the https://www.dropbox.com/1/oauth2/authorize_submit page.
As you wrote, there is a drop down in the upper right corner.
But in case I use the endpoint ...
with the parameter "response_type=token" and
with the parameter "redirect_uri=https://myWebpage.com"
it seems to be difficult to install the similar drop down in the private redirect_uri, doesn't it?
:)
- Greg-DB9 years ago
Dropbox Community Moderator
I'm not sure I understand what you mean when you say "it seems to be difficult to install the similar drop down in the private redirect_uri, doesn't it?"
Can you elaborate? If that's your own private page, you can design it however you'd like.- seizo9 years agoHelpful | Level 6
Sorry for my bad writing. <(_ _)>
I'm not a native English speaker. :)And thanks to your kind advices, I have been able to figure out what I should do.
I would have liked the app-users to know what account he/she logged in, and to have chance to change accounts if he/she wants.
To achieve that, the best way seems to be ....
Step 1 : Get a CODE using the oauth2/authorize end point
Step 2 : Convert the CODE into a bearer token using the /oauth2/token end point
But at first, I was trying to get a bearer token using the oauth2/authorize end point with the parameter "response_type=token".
That seems to be my mistake.I appreciate your help. <(_ _)>
- Greg-DB9 years ago
Dropbox Community Moderator
It's no problem!
The user can change accounts if they want before clicking "Allow". You may want to set force_reapprove=true though. Otherwise, Dropbox may automatically redirect them before that can do so. You can find more information on that parameter here:
https://www.dropbox.com/developers/documentation/http/documentation#oauth2-authorize
About Dropbox API Support & Feedback
Find help with the Dropbox API from other developers.6,037 PostsLatest Activity: 9 hours ago
The Dropbox Community team is active from Monday to Friday. We try to respond to you as soon as we can, usually within 2 hours.
If you need more help you can view your support options (expected response time for an email or ticket is 24 hours), or contact us on X or Facebook.
For more info on available support options for your Dropbox plan, see this article.
If you found the answer to your question in this Community thread, please 'like' the post to say thanks and to let us know it was useful!