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

Shiza's avatar
Shiza
Explorer | Level 3
2 years ago

Unable to search file in Dropbox for business' account using Dropbox Api

Hi, I'm trying to search a file in a dropbox buisness account. I am able to use the search api for an individual dropbox but i want to be able to acheive the same thing for a buisness account aswell. I can list the folders using the api aswell and create a folder in dropbox buisness account but not search.

I used this to make the api call --> https://api.dropboxapi.com/2/files/search_v2

in the header i passed these four parameters

* Authorization: Bearer sl.........
* Content-Type: application/json
* Dropbox-API-path_Root: {".tag": "root", "root": "name-space-id"}
* Dropbox-API-Select-User: dbmid:.....

In body I'm passing 

{

    "query""23-017) 12 Greenwich Road SE7.lnk"
}

Its gives a response of 200 on postman but it should have returned the path and details of that file.

its gives this response

{
    "has_more"false,
    "matches": []
}
I dont know what I'm doing wrong
  • Greg-DB's avatar
    Greg-DB
    Icon for Dropbox Staff rankDropbox Staff

    This response indicates that nothing was found for that particular query for the specified member under the specified namespace. Please check that your query, member ID, and namespace ID are correct. If your values are correct but you are missing search results, feel free to open an API ticket here and we'll look into it. Please include the query, member ID, and namespace ID, but continue to redact the access token.

About Dropbox API Support & Feedback

Node avatar for Dropbox API Support & Feedback

Find help with the Dropbox API from other developers.

5,910 PostsLatest Activity: 3 days ago
333 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!