Your workflow is unique 👨💻 - tell us how you use Dropbox here.
Forum Discussion
good_boy
7 years agoExplorer | Level 4
Keep getting new access token
I can successfully authenticate Dropbox in my Phonegap app the first time, but I keep getting a new one if the button is pressed again, why is that? Shouldn't it return the same token again? And ...
good_boy
7 years agoExplorer | Level 4
If the user is authorizing for the first time, the inappbrowser in Cordova opens the dropbox login web address which allows the user to login and authorize the app, which returns an access token.
But if the button is pressed again, the inappbrowser would open momentarily and then close immediately and return the new access token.
So to a user a blank screen is shown for 1-2 seconds, then it closes.
Greg-DB
Dropbox Community Moderator
7 years agoThanks! It sounds like you're referring to the behavior of the Dropbox OAuth app authorization flow where, if the user has already authorized your app, then they may be automatically redirected back to your app instead of having to provide explicit authorization again. (This is when the browser would presented momentarily, but then would be automatically dismissed since the authorization flow automatically completed.) If the user fully revokes the app's authorization, e.g., via https://www.dropbox.com/account/security , though, then they will not be automatically redirected.
Apps can also control this behavior using the 'force_reapprove' parameter on /authorize:
https://www.dropbox.com/developers/documentation/http/documentation#oauth2-authorize
This isn't currently implemented in the official JavaScript SDK, but I'll be sure to pass this along as a feature request.
Apps can also control this behavior using the 'force_reapprove' parameter on /authorize:
https://www.dropbox.com/developers/documentation/http/documentation#oauth2-authorize
This isn't currently implemented in the official JavaScript SDK, but I'll be sure to pass this along as a feature request.
About Dropbox API Support and Feedback
Get help with the Dropbox API from fellow developers and experts.
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, Facebook or Instagram.
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!