cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
Announcements
Tell us what you want to see on the Community here!
Close

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 DropboxTeam.as_user throws BadInputException app_key is required to refresh tokens

Highlighted

Python SDK DropboxTeam.as_user throws BadInputException app_key is required to refresh tokens

New member | Level 2
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.

1 Reply 1
Highlighted

Re: Python SDK DropboxTeam.as_user throws BadInputException app_key is required to refresh tokens

Dropboxer

[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.

Work Smarter with Dropbox

The way we work is changing. Share and discover new ways to work smarter with Dropbox in our community.

Sound good? Let's get started.
Who's talking

Top contributors to this post

What do Dropbox user levels mean?
Need more support?