cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
Announcements
Want to know what we learned at IBC? Check out our learnings on media, remote working and more right here.

Discuss Dropbox Developer & API

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Is DropBox Access tokenwill expire after some time?

Is DropBox Access tokenwill expire after some time?

otky
Explorer | Level 4

Hi,

 

Currently I'm using OAuth 2.0 flow to generate refresh token and access token . The access token what I'm getting in the response starts with "sl". So is this access token will have expiration time?  And can I use this access token to fetch huge collection of files from DropBox , which may take around 7-8 hours to get all the files? or do I need to use refresh token to regenerate ?

 

Regards,

OTKY.

1 Reply 1

Greg-DB
Dropbox Staff

The Dropbox API does now have two different types of access tokens: "long-lived" and "short-lived". Long-lived access tokens don't expire by default, while short-lived access tokens expire after a short period of time (with an option to use "refresh tokens" for long-term access). Dropbox is moving to exclusively issuing new short-lived access tokens and no longer returning new long-lived access tokens.

 

The "sl." prefix indicates that that access token is short-lived and will only be valid for several hours. (Specifically, it's four hours, but you should get the actual expiration time from the API itself.) If you do need access for longer than that, you would need to request "offline" access in order to get a refresh token which can be used to get new short-lived access tokens as needed, or otherwise have the user occasionally re-authorize the app.

 

I recommend referring to the following resources for more information:

Need more support?
Who's talking

Top contributors to this post

  • User avatar
    Greg-DB Dropbox Staff
What do Dropbox user levels mean?