cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
Announcements
Want to learn some quick and useful tips to make your day easier? Check out how Calvin uses Replay to get feedback from other teams at Dropbox 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: 

Python SDK: refresh_access_token() and check_and_refresh_access_token() need app_key and app_secret

Python SDK: refresh_access_token() and check_and_refresh_access_token() need app_key and app_secret

foxo1
Explorer | Level 4

I only found after experimenting around and re-reading the OAuth guide (https://developers.dropbox.com/de-de/oauth-guide) that the Python SDK functions mentioned in the title need the app_key and app_secret to check and refresh access_tokens.

 

 

 

dbx = dropbox.Dropbox(
    oauth2_access_token=MYTOKEN,
    oauth2_access_token_expiration=MYEXPIRATION, 
    oauth2_refresh_token=MYREFRESHTOKEN, 
    app_key=MY_APP_KEY, 
    app_secret=MY_APP_SECRET
    )

 

 

...is the only way those functions would work.

 

I tried plenty of times just with the bare access_token and combinations of the above. If you look at the API documentation one can see that this is needed but for me, as a beginner in Python and especially with close to zero knowledge about the Dropbox Python SDK, it would have been easier if the documentation was a little bit more elaborate about mandatory class attributes.

 

Anyway besides that little "complaint" I really enjoy the SDK and want to congratulate you for this overall amazing product

1 Reply 1

Greg-DB
Dropbox Staff

Thanks for the feedback! I'll share this with the team to see if we can improve the SDK documentation around this.

Need more support?
Who's talking

Top contributors to this post

  • User avatar
    Greg-DB Dropbox Staff
What do Dropbox user levels mean?