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: 

Hide asking confirmation on login

Hide asking confirmation on login

Issac J.
New member | Level 1

Hello, is it possible to remove the authorization popup everytime on logging in?

If once user is logged in i don't need to show the popup in next login. Is it possible?

7 Replies 7

Greg-DB
Dropbox Staff

Yes, your app can store and re-use the resulting access token for each user, so that it doesn't need to send the user through the OAuth app authorization flow each time. 

Exactly how you do so depends on your platform, and the library/SDK you're using, so I recommend referring to the relevant tutorial and/or documentation.

Issac J.
New member | Level 1

Hello Gregory, the platform I am using is JavaScript. The ide i am using is wakanda(open source for both server side and client side js). The method i am using for authorization is by calling 

https://www.dropbox.com/1/oauth2/authorize/?response_type=token&&client_id='client_Id'&&redirect_uri...".

Could you please suggest a method for hiding the confirmation box on each log in ?

Greg-DB
Dropbox Staff

The result of the OAuth 2 authorize URL you posted is an access token. When that access token (which is just a string) is returned to your app, you can store and re-use it in the future, so that you don't have to send the user to that authorize URL again. Since the access token is just a string, you can store is in whatever data persistence layer you have (i.e., your database, or the browser's local storage, etc.).

Issac J.
New member | Level 1

Ok. I will try that.

Issac J.
New member | Level 1

But the access token generated will be different for different users right? I am not having a specific  login to the application for getting userid. The only authorize call is to the dropbox. If multiple users are using this application and if one particular accesstoken is stored and fetched from the storge, all the items be stored into that particular account.

Greg-DB
Dropbox Staff

That's correct, access tokens are user-specific. It sounds like you mean that your app doesn't have its own user model, and is relying on the Dropbox app authorization flow as authentication. First, it's worth noting that OAuth 2 is for authorization, not authentication, e.g., see these blog posts. Anyway, if you do use this for that anyway, to avoid unnecessarily putting the user through this flow, you can store the necessary data, e.g., the access token, in their cookies or local storage. If and only if you don't find that, you can send them the flow. Also, check out the documentation for the force_reapprove parameter on /oauth2/authorize. By default, Dropbox will automatically redirect the user through the flow when possible.

Issac J.
New member | Level 1

Thanks Gregory for your support.

Need more support?
Who's talking

Top contributors to this post

  • User avatar
    Issac J. New member | Level 1
  • User avatar
    Greg-DB Dropbox Staff
What do Dropbox user levels mean?