Dropbox API Support & Feedback
Find help with the Dropbox API from other developers.
Hi Dropbox Team.
I try to get the content of my Team's root folder.
Here is my call:
curl --location --request POST 'https://api.dropboxapi.com/2/files/list_folder' \ --header 'Dropbox-API-Path-Root: {".tag": "home"}' \ --header 'Dropbox-API-Select-Admin: {"member_id": "dbmidXXXXX"}' \ --header 'Content-Type: application/json' \ --header 'Authorization: Bearer sl.XXXXXXXXXXX' \ --data-raw '{ "path": "" }'
And here is the answer:
Error in call to API function "files/list_folder": Unexpected select user header. Your app does not have permission to use this feature
What am i doing wrong ?
I tried to follow many other questions about it, but didn't found a great documentation to set Header Dropbox-API-Path-Root and Dropbox-API-Select-Admin, like this link: https://www.dropbox.com/developers/documentation/http/teams#access-types and this post https://www.dropboxforum.com/t5/API-Support-Feedback/How-to-list-the-contents-of-a-team-folder/td-p/...
Could you put more examples in your documentation of the content expected in these headers ? Dropbox-API-Select-User and Dropbox-API-Select-Admin .
Thanks a lot !
That "Unexpected select user header" error indicates that you're using an access token for an app that is not allowed to use that feature. That feature is only meant for "Dropbox Business API" apps registered for the "team member file access" permission.
So, for instance, you might be using an access token for a "Dropbox API" app, e.g., with the "full Dropbox" or "app folder" permission. In that case, you don't need to set a 'Dropbox-API-Select-Admin' or 'Dropbox-API-Select-User' header at all. The access token would only be for a single specific account anyway, so you don't need to additionally specify a particular team member ID. (You can still use the "Dropbox-API-Path-Root" header in that case.)
If you did intend to use the "Dropbox Business API" to connect to entire Dropbox Business team(s), in order to access any team member's files via the "member file access" feature, you can register a "Dropbox Business API" app with the "team member file access" permission here.
You can find the documentation for the "member file access" feature here.
And you can find the documentation for using the "Dropbox-API-Path-Root" header to access different parts of a Dropbo....
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!