Forum Discussion

hcraeser's avatar
hcraeser
Explorer | Level 3
7 years ago

How to search file content for all users on a business account?

I've used the Dropbox Admin toolkit to search all users files and folders names and content for keywords.  However, I can't export or save that information using the toolkit.  Is there a way to use the APIs to search all users' file names and content?  I know I can use file/search to search my own but how would I search all users?

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

    There isn't an efficient way to do this unfortunately, but you can accomplish this by using /2/file/search for each user.

    The basic outline would look like this:

    • Register an app for the "team member file access" permission and use the "Generate" button to get an access token for your team, if you don't already have one. 
    • Call /2/team/members/list[/continue] or /2/team/members/get_info to get each team member's information, specifically their member ID, if you don't already have it.
    • For each member, call /2/files/search with Dropbox-API-Select-User containing the member ID, as necessary.

    (Alternatively, if the DropboxBusinessAdminTool already does most of what you want, you may just want to fork and modify that directly instead.)

About Dropbox API Support & Feedback

Node avatar for Dropbox API Support & Feedback
Find help with the Dropbox API from other developers.5,951 PostsLatest Activity: 49 minutes ago
352 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!