We’re Still Here to Help (Even Over the Holidays!) - find out more here.
Forum Discussion
otky
5 years agoExplorer | Level 4
Is DropBox Access tokenwill expire after some time?
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
- Greg-DB5 years ago
Dropbox Community Moderator
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:
About Discuss Dropbox Developer & API
Make connections with other developers
The Dropbox Community team is active from Monday to Friday. We try to respond to you as soon as we can, usually within 2 hours.
If you need more help you can view your support options (expected response time for an email or ticket is 24 hours), or contact us on X, Facebook or Instagram.
For more info on available support options for your Dropbox plan, see this article.
If you found the answer to your question in this Community thread, please 'like' the post to say thanks and to let us know it was useful!