We’re Still Here to Help (Even Over the Holidays!) - find out more here.
Forum Discussion
Linus_s_g
5 years agoNew member | Level 2
help understanding token_access_type offline
Hello, I am trying to understand how I should work with an offline token? Currently, I am using a token with 'no-expiration', but I have read the following in the documentation (https://developers....
Greg-DB
Dropbox Community Moderator
5 years agoYou can find more information on this migration in this blog post. That change, where Dropbox will no longer return new long-lived access tokens, is planned for September 30th, 2021.
Going forward, any apps that need long-term access should instead use short-lived access tokens with refresh tokens. An app can use a refresh token to get new short-lived access tokens for the user whenever needed, without further manual user interaction. An app gets a refresh token by requesting "offline" access.
That linked example shows an updated example implementation of using the OAuth flow via the Dropbox Python SDK to request offline access and get a refresh token, which is available in the "oauth_result.refresh_token" variable there. That enables the app to get long-term access without having the user manually re-authorize it repeatedly.
Refresh tokens can be stored and re-used for any particular app-user pair, just like long-lived access tokens could. Note though that, also like long-lived access tokens, refresh tokens can be revoked by the user or app at any time.
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!