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

Sign out user from dropbox website with an API call

Sign out user from dropbox website with an API call

BIMcollab
Helpful | Level 5

Hi,

I am wokring with the Dropbox API v2 .NET SDK.

In my code I want to make it so that users can log in with different dropbox credentials. Right now a user can "sign out" and the token is invalidated and deleted. However, if the user has the dropbox website opened in the same browser and is signed in, the sign in step of the OAuth flow is skipped and the user gets a token from the same credentials.

I am looking for a way to sign users out from the dropbox website whenever the token is deleted so that when the user signs in he/she will get the opportunity to fill in new credentials and get a token for another account. Is there a way to achieve this?

2 Replies 2

Re: Sign out user from dropbox website with an API call

Здравко
Super Collaborator | Level 20

Hi @BIMcollab,

Actually you can. Just fire out "https://www.dropbox.com/logout" before ask to the user for new creditials. :wink:

Hope this helps.

Re: Sign out user from dropbox website with an API call

Greg-DB
Dropboxer

@BIMcollab As Ð—дравко mentioned, you can direct the user to https://www.dropbox.com/logout at any time to log them out of the Dropbox web site. Make sure you do so with the user's understanding though, as forcibly logging them out without their knowledge may be confusing or disruptive to them.

Or, you can use the 'forceReapprove' or 'forceReauthentication' parameter on the GetAuthorizeUri method to require the user to explicitly re-authorize the app (giving them a chance to switch accounts, if they wish) or log the user out, respectively, during the app authorization flow. (Apologies, the docs there seem to be missing the full description of these parameters. I'll ask the team to fix that up. In the meantime you can find the corresponding documentation in the HTTP docs here.)

Who's talking

Top contributors to this post

  • User avatar
    Greg-DB Dropboxer
  • User avatar
    Здравко Super Collaborator | Level 20
What do Dropbox user levels mean?
Need more support?