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

JuliaNowicka's avatar
JuliaNowicka
Explorer | Level 4
3 years ago

List files for a user

Hi, I need to list all files stored in my company's Dropbox. I wanted to call the list_folder endpoint as each user, but I'm not sure if that will be enough. 

Is that the best way of getting the information? 

Thank you in advance!

  • Greg-DB's avatar
    Greg-DB
    Icon for Dropbox Staff rankDropbox Staff

    To list all files/folders under an account, you can use files_list_folder and files_list_folder_continue, specifying recursive=True and path="" (the empty string) on files_list_folder. You can do so for each team member, but be aware that there may be duplication if you do so, since members may have shared folders and/or team folders in common. For that reason, it may be better to start with team_namespaces_list and team_namespaces_list_continue instead to get a list of namespaces and then list each namespace instead.

     

    Like discussed for shared links in your other thread though, note that by default the root is the user's member folder. If the user is on a team with a team space, you can list everything in the team space, but to do so you'd need to configure the call as described in the Team Files Guide to access the team space. With the Python SDK, you'd use the with_path_root method to set that.

About Dropbox API Support & Feedback

Node avatar for Dropbox API Support & Feedback
Find help with the Dropbox API from other developers.5,917 PostsLatest Activity: 27 minutes ago
334 Following

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