cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
Announcements
Back again with another edition of 'How we use Dropbox', so find out how Emma uses to-do lists to get it all done 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

Re: Python SDK: refresh_access_token() and check_and_refresh_access_token() need app_key and app_sec

Greg-DB
Dropboxer

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

Who's talking

Top contributors to this post

  • User avatar
    Greg-DB Dropboxer
What do Dropbox user levels mean?
Need more support?