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
Simson G.
8 months agoExplorer | Level 3
Dropbox tutorial is not updated for OAuth and assumes that I can get an ACCESS TOKEN...
I am a fairly experienced developer but new to the Dropbox API.
I am on this page, the Dropbox for Python Tutorial.
The example assumes that I can get an ACCESS TOKEN from the App Console.
However, my App Console does not offer me an ACCESS TOKEN. It only offers me OAuth tools. I have had bad luck with OAuth 2.0 on platforms other than Google, as there are frequently minor mismatches in OAuth implementations. On Google I use Google's OAuth client.
Questions:
- Is there sample code that works for the Dropbox OAuth implementation?
- Why doesn't Dropbox update its tutorial? Am I missing something?
Dropbox offers two different ways to get an access token:
- using the OAuth app authorization flow
- using the "Generate" button on the app's page on the App Console (under "Generated access token" in the "OAuth 2" section on the "Settings" tab of the app's page)
That "Generate" button is what the Python tutorial is referring to. Note though that the "Generate" button can only be used to get an access token for the particular account that owns the app, and can only generate short-lived access token, not a refresh token.
If you need long-term access, or to have any other accounts connect to the app, you'll need to use the OAuth app authorization flow.
The Dropbox Python SDK does offer support for processing the OAuth app authorization. You can find examples of processing the OAuth app authorization flow with the Dropbox Python SDK here.
- Greg-DBDropbox Staff
Dropbox offers two different ways to get an access token:
- using the OAuth app authorization flow
- using the "Generate" button on the app's page on the App Console (under "Generated access token" in the "OAuth 2" section on the "Settings" tab of the app's page)
That "Generate" button is what the Python tutorial is referring to. Note though that the "Generate" button can only be used to get an access token for the particular account that owns the app, and can only generate short-lived access token, not a refresh token.
If you need long-term access, or to have any other accounts connect to the app, you'll need to use the OAuth app authorization flow.
The Dropbox Python SDK does offer support for processing the OAuth app authorization. You can find examples of processing the OAuth app authorization flow with the Dropbox Python SDK here.
- Simson G.Explorer | Level 3
Thank you. It was unclear to me that the "Generate" in a box was a button that could be clicked.
It would be great to have an example of using OAuth. I'm now working with https://github.com/donaldm314/dropbox-commandline-oauth-refresh
Also, as a side comment, it is nearly impossible for me to read the light grey text on the white background on your web page. Because of anti-aliasing, the letters have a single pixel of color 139/139/139 (where black would be 255/255/255). You may wish to move to a more legible CSS setting.)
- Greg-DBDropbox Staff
Thanks for the feedback! I'll pass this along to the team.
About Dropbox API Support & Feedback
Find help with the Dropbox API from other developers.
5,888 PostsLatest Activity: 60 minutes 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!