Need to see if your shared folder is taking up space on your dropbox 👨💻? Find out how to check here.
Forum Discussion
time4116
8 years agoExplorer | Level 4
Download data for all users on team
What is the best way to download the contents of all user folders? I've created a DropBox API application but this seems to only allow access to my content, I've also created a DropBox Buisness API (...
- 8 years ago
To download all non-team and non-shared file content from all members of a team without individual user action, you'll need a Dropbox Business API app with the "team member file access" permission. This will let you use the "Member file access" feature to access each member's account.
The basic outline of the code would go like this:
- Call /2/team/members/list[/continue] to get all of the members.
- For each desired member, use the "Member file access" feature to call /2/files/list_folder[/continue] with path="" and recursive=true to get the full file/folder listing for the member. (Note that this will include anything mounted inside the member's Dropbox, e.g., shared folders or mounted team folders, so you'd have to filter those out, and you may get duplicates across members, e.g., from shared folders.)
- For every desired file for each member, use the "Member file access" feature to call /2/files/download to download the file.
Alternatively, you can use /2/team/namespaces/list[/continue] instead of listing each member and then listing everything for each member.
Greg-DB
Dropbox Community Moderator
8 years agoTo download all non-team and non-shared file content from all members of a team without individual user action, you'll need a Dropbox Business API app with the "team member file access" permission. This will let you use the "Member file access" feature to access each member's account.
The basic outline of the code would go like this:
- Call /2/team/members/list[/continue] to get all of the members.
- For each desired member, use the "Member file access" feature to call /2/files/list_folder[/continue] with path="" and recursive=true to get the full file/folder listing for the member. (Note that this will include anything mounted inside the member's Dropbox, e.g., shared folders or mounted team folders, so you'd have to filter those out, and you may get duplicates across members, e.g., from shared folders.)
- For every desired file for each member, use the "Member file access" feature to call /2/files/download to download the file.
Alternatively, you can use /2/team/namespaces/list[/continue] instead of listing each member and then listing everything for each member.
time4116
8 years agoExplorer | Level 4
Thanks Greg! This is perfect.
It looks like the /files/download method ignores team folders as far as the ability to download or recurse.? If so, I may not need to worry about excluding folders, but Is there a way to do it via /files/list_folder?
- chirstius8 years ago
Dropbox Staff
Hey time4116,
There's no direct way currently to exclude them via the initial call to /files/list_folder, but if you use /team/namespaces/list[/continue], you can filter the NamespaceMetadata that comes back on its "namespace_type" attribute. You could alternatively call /team/team_folder/list[/continue] and just use that list as a guide to filter entries from /files/list_folder[/continue]
Hope that helps,
-Chuck
About Dropbox API Support & Feedback
Find help with the Dropbox API from other developers.
The Dropbox Community team is active from Monday to Friday. We try to respond to you as soon as we can, usually within 2 hours.
If 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, Facebook or Instagram.
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!