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?
@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. ...
... 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. ...
... 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?
... 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.
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.
@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.
There are no any specific details about my postman request. Just default request from dropbox api collection. Yes, I am using /2/users/get_current_account endpoint to get my account info. Since my current plan is free aka basic, my account is not a team account. I have Dropbox-Api-Path-Root where I put my namespace id but I don't have Dropbox-API-Select-User since my account is not a team account and so I don't get team_member_id from /2/users/get_current_account endpoint. Hence my question - can I use /2/files/search_v2 endpoint without Dropbox-API-Select-User header? Thks
@Artyom L wrote: ... Since my current plan is free aka basic, my account is not a team account. ... Hence my question - can I use /2/files/search_v2 endpoint without Dropbox-API-Select-User header? Thks
... Since my current plan is free aka basic, my account is not a team account. ... Hence my question - can I use /2/files/search_v2 endpoint without Dropbox-API-Select-User header? Thks
Seems you read my posts... no very consistently (if could be said so). 🤦
Ok... I will repeat: For individual account (including basic), you shouldn't use such headers (both Dropbox-Api-Path-Root and Dropbox-API-Select-User) - they are incompatible! Even more you don't need them!!! Why at all you are trying this for basic account? There is one namespace only, it's the default one, and it cannot be changed. 🤷 Even if it was possible, it would stay meaningless.
it seems you are right thks