cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
Announcements
Want to learn some quick and useful tips to make your day easier? Check out how Calvin uses Replay to get feedback from other teams at Dropbox 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: 

Getting content of Team's root folder, can't find good documentation of Dropbox-API-Select-Admin

Getting content of Team's root folder, can't find good documentation of Dropbox-API-Select-Admin

ClementFtNd
New member | Level 2

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 !

1 Reply 1

Greg-DB
Dropbox Staff

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

Need more support?
Who's talking

Top contributors to this post

  • User avatar
    Greg-DB Dropbox Staff
What do Dropbox user levels mean?