Discuss Dropbox Developer & API
Hi!
I'm trying to retrieve all the folders inside my Dropbox account. In the first approach I'm just able to retrieve the info from something like my "home folder" but there is other folders that I created as the admin that are not being showed calling 'files_list_folder()' function.
I'm instantiating my DB account as
dbx = dropbox.Dropbox(oauth2_refresh_token=REFRESH_TOKEN, app_key=APP_KEY)
I tried to use DropboxTeam like that:
dbx = dropbox.DropboxTeam(oauth2_refresh_token=REFRESH_TOKEN, app_key=APP_KEY).as_admin(ADMIN_ID)
dbx.files_list_folder("")
But I'm getting this error: 'dropbox.exceptions.BadInputError: BadInputError('a5c6fcd46470407982efeb801ea9c3ac', 'Error in call to API function "files/list_folder": Unexpected select user header. Your app does not have permission to use this feature')'
Any solutions to this?
@AlvaroHuertas, have you selected some team scope for your application 🤔 or not yet? Without team scope you can't use team related features even when the API call, you're using, doesn't require such scopes! In such cases the call will be rooted to the home scope and you can't change this. Keep in mind that when you change some application scope, you need to authenticate your application anew (such changes are NOT retroactive) - OAuth anew.
@AlvaroHuertas Looking at the error and code, as Здравко said, it looks like you're trying to use a feature that your app is not actually configured for. For example, if your app is not team-linked, you wouldn't use as_admin.
And for information on how to access the team space, check out the Team Files Guide.
Hi there!
If you need more help you can view your support options (expected response time for a 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!