cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
Announcements
Share your feedback on the Document Scanning Experience in the Dropbox App right here.

Dropbox API Support & Feedback

Find help with the Dropbox API from other developers.

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Re: Dropbox tutorial is not updated for OAuth and assumes that I can get an ACCESS TOKEN...

Dropbox tutorial is not updated for OAuth and assumes that I can get an ACCESS TOKEN...

Simson G.
Explorer | Level 3

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:

  1. Is there sample code that works for the Dropbox OAuth implementation? 
  2. Why doesn't Dropbox update its tutorial? Am I missing something?
1 Accepted Solution

Accepted Solutions

Greg-DB
Dropbox Staff

Dropbox offers two different ways to get an access token:

  1. using the OAuth app authorization flow
  2. 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.

View solution in original post

3 Replies 3

Greg-DB
Dropbox Staff

Dropbox offers two different ways to get an access token:

  1. using the OAuth app authorization flow
  2. 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.)

 

 

SimsonG_0-1713310432979.png

SimsonG_1-1713310561975.png

 

Greg-DB
Dropbox Staff

Thanks for the feedback! I'll pass this along to the team.

Need more support?