We are aware of the issue with the badge emails resending to everyone, we apologise for the inconvenience - learn more here.
Forum Discussion
L. Ladibug
9 years agoNew member | Level 1
Dropbox API V2 Sign out
Hi, I am developing an android app. It uses api v2 to upload images, sign in, and sign out. I don't know how to sign out from my app. Can you help me?
- Steve M.Dropbox Staff
What do you mean by "sign out?"
If you want to "forget" a user in your app, just delete the stored access token and stop using the auth'd DbxClientV2 object.
- L. LadibugNew member | Level 1
"Sign out" is users can log in another account. Deleting access token is just not to link an existed account.
- Steve M.Dropbox Staff
You can log a user in whenever you want. Just take the new user through the OAuth flow.
Maybe you can be more specific about the problem you're having.
- L. LadibugNew member | Level 1
I use dropbox-sdk-java to develop an Android app. There are three buttons in a window.
One is "Login". Two is "Logout". Three is "Upload". Users can not logout after log a user in.
Can you tell me how to use the sdk to do OAuth flow.
- Steve M.Dropbox Staff
What does your "Login" button do?
Just do that again.
- L. LadibugNew member | Level 1
When users click the button, I will call startOAuth2Authentication api.
If a user account never login, it will ask users to enter E-mail and password.
- L. LadibugNew member | Level 1
I want to ask users to enter E-mail and password every time click login button.
- Steve M.Dropbox Staff
Ah, I think maybe I understand.
- A user clicks the "log in" button in your app.
- You take the user through the OAuth flow in the browser (since the Dropbox app is not installed).
- If the user isn't already logged in to the Dropbox website, they'll need to enter their username and password to log in.
- Now a new user on the same device wants to log in to your app. But the previous user is still logged in on the Dropbox website.
So you want to programmatically log the user out of dropbox.com. This is not something you can do via the API, since in general, users don't want apps to be able to log them out of their browser sessions.
That said, you can always send the user to https://www.dropbox.com/logout, which will log them out in the browser, but it won't return the user to your app.
- L. LadibugNew member | Level 1
Thank you a lot. Can I use WebView to login and logout? Do you have sample code?
- Steve M.Dropbox Staff
Yes, it's possible to do this, but I don't have any sample code to share.
About Dropbox API Support & Feedback
Find help with the Dropbox API from other developers.
5,876 PostsLatest Activity: 5 hours agoIf 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!