cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
Announcements
Back again with another edition of 'How we use Dropbox', so find out how Emma uses to-do lists to get it all done 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: 

Is there any way to check that access token is already generated for the particular user?

Is there any way to check that access token is already generated for the particular user?

Ashish_Bijlwan
Explorer | Level 4

Hi,

I am using  dropbox java sdk for generating access token using oauth for a user and further i am using that access token to getting the file from dropbox to our project.But  the problem is that the token is generated every time the user logs in,which i am thinking is not a good way.Altough  old access token and new access token are working perfectly.

So is there any way in dropbox sdk to check that access token is already generated for the particular user?

 

1 Reply 1

Re: Is there any way to check that access token is already generated for the particular user?

Greg-DB
Dropboxer

The Dropbox API itself does not offer a way to check if any access tokens were already generated for a particular user.

You shouldn't need to do so anyway though. Once the app receives an access token, it should store and re-use that access token. Dropbox API access tokens don't expire by themselves so apps can re-use existing access tokens without sending the user through the authorization flow each time.

Exactly how you securely store and retrieve the access token is up to you though, and will depend on what kind of secure storage is available to your on your platform. In any case, the basic idea is that you should check your storage to see if you have an access token for the user already and use that, before prompting them to authorize the app if not.

Poll
We love to learn from the educators who use Dropbox. Whether you teach kids, teens, adults or a combination of all three, we want to know what apps and integrations you use with Dropbox to help with teaching. Which of the ones below is your favorite, or most used tool?
Who's talking

Top contributors to this post

  • User avatar
    Greg-DB Dropboxer
What do Dropbox user levels mean?
Need more support?