Need to see if your shared folder is taking up space on your dropbox 👨💻? Find out how to check here.
Forum Discussion
musidelics_0
4 years agoNew member | Level 2
How to automatically generate an access code using the Dropbox API (Python)
I am currently working on a Python program where I automatically upload generated videos to Dropbox using the API and run the program on the cloud (so it's 100% required that it's 100% automated), but I can't seem to find a way to automatically generate new access tokens when the old one expires.
The only method I seem to find involves doing it manually, which I can't afford. How do I solve this?
2 Replies
- Здравко4 years agoLegendary | Level 20
musidelics_0 wrote:..., but I can't seem to find a way to automatically generate new access tokens when the old one expires. ...
You don't need to explicitly 'generate new access tokens'. The only thing you need is using refresh token on client object building and... that's it. 😉 You can continue use it as you are doing now (the object itself will take care for the 'generation').
Hope this helps.
- Greg-DB4 years ago
Dropbox Community Moderator
musidelics_0 Здравко is correct. You can use a refresh token to automatically get new short-lived access tokens. For instance, if you're using the official Dropbox Python SDK, and supply the necessary credentials, e.g., as shown in this example, the SDK will handle the refresh process for you automatically.
About Dropbox API Support & Feedback
Find help with the Dropbox API from 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!