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

Artyom L's avatar
Artyom L
Explorer | Level 3
2 years ago

Search V2 API

Hi! I am building Dropbox integration. Currently working with the search. I am using https://api.dropboxapi.com/2/files/search_v2 api. For tests now I am using basic plan. In the documentation it says that I need Dropbox-API-Path-Root param to make a request but it seems that there is no such param for basic plan. If I make request without this param endpoint gives me "error_summary": "no_permission/" error. My connected app has the requiredfiles.metadata.read scope. Do I need to upgrade to paid plan to work with search I do I miss something?

  • Здравко's avatar
    Здравко
    Legendary | Level 20

    Artyom L wrote:

    ... For tests now I am using basic plan. In the documentation it says that I need Dropbox-API-Path-Root param to make a request but it seems that there is no such param for basic plan. ...


    Hi Artyom L,

    First of all let clarify some terminology. 'Dropbox-API-Path-Root' is not param, but header! In spite you can miss this when using some SDK, it's just something different. This header is used when you may need to change default access namespace to another one. When you use individual plan (including basic one) you don't need such change. Change of path root is usable on team plans only working with spaces, where by default your namespace is the private one, but you need to access more than just member's files (i.e. to access team spaces). For basic (and other individual) plan don't use the header mentioned.

     


    Artyom L wrote:

    ... If I make request without this param endpoint gives me "error_summary": "no_permission/" error. ...


    It's good to clarify what you have done to get to such a message. Describe a way for reproducing it (including some code snipped(s) and unexpected output). Hide/mask any private information (like access or refresh tokens).

     


    Artyom L wrote:

    ... Do I need to upgrade to paid plan to work with search I do I miss something?


    No. To use such endpoint you can use any account (including free). You may need a team account (all of them are paid) only if you need to test some team related endpoint (the one you're testing is not such).

    Hope this gives direction.

    • Artyom L's avatar
      Artyom L
      Explorer | Level 3

      Hi. Thanks for the response. Yes Dropbox-API-Path-Root is header not param you are right. I get this "error_summary": "no_permission/" error when I am making request from postman. I just take postman collection for Dropbox api, made call to https://api.dropboxapi.com/2/files/search_v2 POST endpoint.

      • Здравко's avatar
        Здравко
        Legendary | Level 20

        Artyom L, You still didn't post anything related to how/what you have posted, using your POSTMAN, in details! 🤷 Also what is the account you're using? You make me speculate. Don't use such header on individual account. Where have you taken the namespace id from in use as header value? 🧐 Is it certain context account has access to that namespace? 🤔

        Typically, as I mentioned before, you need to use such header when you need access outside team member folder (the access is restricted to there by default). In such a case you typically need access to the team root space; all team members have access to there. Once you have access to the team root, you can access everything particular member has access to. Of course, you can use another namespace, but make sure in advance that context have permission to access there!

        Try following: First call /2/users/get_current_account (without additional headers, including without Dropbox-Api-Path-Root). You will find there a field named "root_namespace_id" residing in "root_info". It's a numerical value. Make sure your account is team account (there are fields like "team" or "team_member_id"). At the end, call /2/files/search_v2 with header "Dropbox-Api-Path-Root: <namespace ID>", where <namespace ID> is the numerical value you got before. Also pass "Dropbox-API-Select-User: <team_member_id>" header, where <team_member_id> is the value of corresponding field. 🙋 Does it work now?

        Good luck.

About Dropbox API Support & Feedback

Node avatar for Dropbox API Support & Feedback

Find help with the Dropbox API from other developers.

5,915 PostsLatest Activity: 2 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!