Forum Discussion

Shiza's avatar
Shiza
Explorer | Level 3
3 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

1 Reply

  • Greg-DB's avatar
    Greg-DB
    Icon for Dropbox Community Moderator rankDropbox Community Moderator
    3 years ago

    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.

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!