You might see that the Dropbox Community team have been busy working on some major updates to the Community itself! So, here is some info on what’s changed, what’s staying the same and what you can expect from the Dropbox Community overall.
Forum Discussion
jgriffo1
3 years agoNew member | Level 2
How can I automate retrieval of a refresh token using the Python API?
I have a Python app that is intended to run as a scheduled job to save files to Dropbox at regular intervals. When I have a refresh token, this works fine: dbx = dropbox.Dropbox(app_key='xxx', ap...
Greg-DB
Dropbox Staff
[Cross-linking for reference: https://stackoverflow.com/questions/71955472/how-do-i-automate-retrieval-of-a-refresh-token-using-the-dropbox-python-3-x-api ]
Dropbox API refresh tokens do not expire after four hours. They can be revoked on demand, but they do not expire automatically, and can be stored and re-used repeatedly. (The short-lived access tokens themselves do expire, but the refresh token can be used to get new short-lived access tokens whenever needed. The official Dropbox SDKs will do that process for you automatically.)
So, while you do need to manually process the app authorization flow once to get a refresh token, once you have it, you can store and re-use it for long-term access without further manual interaction.
igor-plotnikov
2 years agoNew member | Level 2
The page you referenced here won't open. Could you please share the snippet of how to get an access token having a refresh token and using the official Python SDK?
- Greg-DB2 years agoDropbox Staff
igor-plotnikov Can you clarify what you mean when you say the page won't open? Are you getting some error? That link is working for me.
In any case, for the official Dropbox Python SDK, you can find examples of getting and using a refresh token at the following links:
- igor-plotnikov2 years agoNew member | Level 2
Here is what I see:
Thank you for the useful links!
About Dropbox API Support & Feedback
Find help with the Dropbox API from other developers.
5,910 PostsLatest Activity: 3 days 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!