One month down in 2025: How are your resolutions coming along? Check out how to get back on track here.
Forum Discussion
ronalddy1
5 years agoNew member | Level 2
Python SDK DropboxTeam.as_user throws BadInputException app_key is required to refresh tokens
dbx_t = dropbox.DropboxTeam( oauth2_refresh_token=refresh_token, app_key=app_key, app_secret=app_secret ) admin = dbx_t.team_token_get_authenticated_admin() dbx_t.as_user(admin.admin_profile.team_member_id)
this raises
File "venv/lib/python3.6/site-packages/dropbox/dropbox.py", line 715, in as_user team_member_id) File "venv/lib/python3.6/site-packages/dropbox/dropbox.py", line 739, in _get_dropbox_client_with_select_header headers=new_headers, File "venv/lib/python3.6/site-packages/dropbox/dropbox.py", line 185, in __init__ raise BadInputException("app_key is required to refresh tokens") dropbox.dropbox.BadInputException: app_key is required to refresh tokens
Am I using DropboxTeam.as_user incorrectly?
I looked into the code at dropbox/dropbox.py line 739. It seems like the app_key and app_secret arguments are not passed to the new Dropbox instance.
- Greg-DB
Dropbox Staff
[Cross-linking for reference: https://github.com/dropbox/dropbox-sdk-python/issues/213 ]
Thanks for the report! I'll follow up with you on the GitHub issue.
About Dropbox API Support & Feedback
Find help with the Dropbox API from other developers.5,945 PostsLatest Activity: 2 hours ago
If 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!