cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
Announcements
We recently received a question asking for advice on how to set up a Dropbox account for an elderly family member. This prompted us to think about the different ways we can make Dropbox more accessible in general, learn about it and add your tips right over 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: 
1
Ask
2
Reply and help

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?