cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
Announcements
Want to learn some quick and useful tips to make your day easier? Check out how Calvin uses Replay to get feedback from other teams at Dropbox 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: 

Re: 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

Здравко
Legendary | 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.

Greg-DB
Dropbox Staff

@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.)

Need more support?