You might see that the Dropbox Community team have been busy working on some major updates to the Community itself! So, here is some info on what’s changed, what’s staying the same and what you can expect from the Dropbox Community overall.
Forum Discussion
time4116
7 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 (...
- 7 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
7 years agoDropbox Staff
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.
- time41167 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?
- chirstius7 years agoDropbox 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.
5,910 PostsLatest Activity: 3 days 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!