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
FrancoisNOYEZ
4 years agoExplorer | Level 4
How to migrate to new Auth workflow with python SDK while minimizing need for single user input?
Hello Dropbox team,
I have set up a small app as a python script which runs continuously on my server, and which needs to read some files that I store on my Dropbox storage space, in the folder...
- 4 years ago
FrancoisNOYEZ Здравко is correct, under the new system you do not need to interact with your script every time it runs. You can supply it the refresh token like you previously supplied it a long-lived access token and it will automatically run without manual user interaction, as before.
You do need to process the app authorization flow one time to get a refresh token though. You can refer to this example to see how to process the app authorization flow to get a refresh token, at which point you can then set up a client using it, as shown at the end of the example.
Здравко
4 years agoLegendary | Level 20
FrancoisNOYEZ wrote:
...From what I can see, I will always need to interact with the script every time I launch it, in order to copy the authorization code and provide it to the script, is that right?
...
Hi FrancoisNOYEZ,
No, that's NOT right. 😉 Relax. 🙂
You can migrate to OAuth2 and you will need to interact to your script only for the long lived token - refresh token (i.e. at the beginning), nothing more! This token doesn't expire - the same like before (almost). The only difference is that it can't be used directly in API calls. The its only purpose is generation of short living tokens - access token, usable within API calls. You usually should not take care of this process, since it's performed in the SDK (internally) and you can continue usage of SDK's calls in the same way as before. When need new token will be generated on demand without your additional interaction. SDK will call /oauth2/token for you. Might be need little bit more care if you call on some place(s) API calls directly, bypassing SDK.
Hope this helps to some extent.
About Dropbox API Support & Feedback
Find help with the Dropbox API from other developers.
5,883 PostsLatest Activity: 2 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!