We are aware of the issue with the badge emails resending to everyone, we apologise for the inconvenience - learn more here.
Forum Discussion
dmartinez
2 years agoExplorer | Level 3
Acces token for python django
Hello, im trying to acces with a django porject to my own account files but the short live tokens renew each 4 hours i tried generating the offline token but it results on renewing it again, i am not...
- 2 years ago
dmartinez Здравко is correct; for long-term access you should use a refresh token. Refresh tokens do not expire and can be used repeatedly. You do not need to re-authorize the app each time. Once you have a refresh token you can store and re-use that refresh token without further manual action.
The official Dropbox Python SDK will handle the details of how to use a refresh token for you, so you would just need to make the Dropbox client object like this, if you used PKCE to retrieve the refresh token:
dropbox.Dropbox(oauth2_refresh_token=REFRESH_TOKEN, app_key=APP_KEY)
or like this, if you did not use PKCE to retrieve the refresh token:
dropbox.Dropbox(oauth2_refresh_token=REFRESH_TOKEN, app_key=APP_KEY, app_secret=APP_SECRET)
For reference, you can find more information on how this works at the following resources:
Greg-DB
Dropbox Staff
dmartinez Здравко is correct; for long-term access you should use a refresh token. Refresh tokens do not expire and can be used repeatedly. You do not need to re-authorize the app each time. Once you have a refresh token you can store and re-use that refresh token without further manual action.
The official Dropbox Python SDK will handle the details of how to use a refresh token for you, so you would just need to make the Dropbox client object like this, if you used PKCE to retrieve the refresh token:
dropbox.Dropbox(oauth2_refresh_token=REFRESH_TOKEN, app_key=APP_KEY)
or like this, if you did not use PKCE to retrieve the refresh token:
dropbox.Dropbox(oauth2_refresh_token=REFRESH_TOKEN, app_key=APP_KEY, app_secret=APP_SECRET)
For reference, you can find more information on how this works at the following resources:
dmartinez
2 years agoExplorer | Level 3
thank you, i was testing this approach this days i delivered the app and just gave it the autorization and still working, thank you for the help !
About Dropbox API Support & Feedback
Find help with the Dropbox API from other developers.
5,876 PostsLatest Activity: 5 hours agoIf 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 or Facebook.
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!