We are aware of the issue with the badge emails resending to everyone, we apologise for the inconvenience - learn more here.
Forum Discussion
dochdl
7 years agoHelpful | Level 6
Getting files from a non root namespace
Hi I want to be able to track all changes in all folders including in namespaces that are not a root user's root folder I use a team token. When I use /list_folder with the Dropbox-API-Select-...
- 7 years ago
So seems as if using Dropbox-Api-Select-Admin header solves the problem
However, it does not appear in your documentation
so the answer is using this request:
POST /2/files/list_folder
Host: https://api.dropboxapi.com
Authorization: Bearer <token>
Content-Type: application/json
Dropbox-Api-Select-Admin: dbmid:AAA...Rw
{
"path": "ns:2464786048",
"recursive": true
}
dochdl
Helpful | Level 6
So it wasn't a wrong token
It is working for the root directory of a user but not for other namespaces
for ex (from your api explorer):
POST /2/files/list_folder
Host: https://api.dropboxapi.com
User-Agent: api-explorer-client
Authorization: Bearer <token>
Content-Type: application/json
Dropbox-Api-Select-User: dbmid:AAA...Rw
{
"path": "ns:2464419056",
"recursive": true
}
returns results. this namespace is a root folder for the user in the header "Dropbox-Api-Select-User" (type=team_member_folder)
but this request returns path not found:
POST /2/files/list_folder
Host: https://api.dropboxapi.com
User-Agent: api-explorer-client
Authorization: Bearer <token>
Content-Type: application/json
Dropbox-Api-Select-User: dbmid:AAA...Rw
{
"path": "ns:2464786048",
"recursive": true
}
here it is the team's shared space (type=team_folder)
I get the same error for the default "Marketing" namespace (type=shared_folder)
It is working for the root directory of a user but not for other namespaces
for ex (from your api explorer):
POST /2/files/list_folder
Host: https://api.dropboxapi.com
User-Agent: api-explorer-client
Authorization: Bearer <token>
Content-Type: application/json
Dropbox-Api-Select-User: dbmid:AAA...Rw
{
"path": "ns:2464419056",
"recursive": true
}
returns results. this namespace is a root folder for the user in the header "Dropbox-Api-Select-User" (type=team_member_folder)
but this request returns path not found:
POST /2/files/list_folder
Host: https://api.dropboxapi.com
User-Agent: api-explorer-client
Authorization: Bearer <token>
Content-Type: application/json
Dropbox-Api-Select-User: dbmid:AAA...Rw
{
"path": "ns:2464786048",
"recursive": true
}
here it is the team's shared space (type=team_folder)
I get the same error for the default "Marketing" namespace (type=shared_folder)
dochdl
7 years agoHelpful | Level 6
So seems as if using Dropbox-Api-Select-Admin header solves the problem
However, it does not appear in your documentation
so the answer is using this request:
POST /2/files/list_folder
Host: https://api.dropboxapi.com
Authorization: Bearer <token>
Content-Type: application/json
Dropbox-Api-Select-Admin: dbmid:AAA...Rw
{
"path": "ns:2464786048",
"recursive": true
}
- chirstius7 years agoDropbox Staff
dochdl for future reference, the Select-Admin header is covered in our Business Endpoints documentation under "Member file access":
https://www.dropbox.com/developers/documentation/http/teams#teams-member-file-access
About Dropbox API Support & Feedback
Find help with the Dropbox API from other developers.
5,878 PostsLatest Activity: 6 hours agoIf 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!