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
Legrend_Sargentpc
2 months agoExplorer | Level 3
Zapier - 409 error path/not found
Hello everyone!
I'm trying to get the meta data for a file so I can access the "shared_folder_id" and then add a member (or group if possible) to that folder. It's on a team folder.
I'm using Zapier as I want this to be automated upon a trigger.
The issue I get is during a Post request to get_metadata, the path cannot be found (error 409)
I first find a folder, which returns correctly.
Then I run a custom request (http) for:
{
"include_deleted": false,
"include_has_explicit_shared_members": false,
"include_media_info": false,
"path": "<path from the previous find folder path in zap>" }
I've also verified this folder path does exist (I can see it, and it's all spelt correctly). This leads me to believe it's a access or permission error, but I'm not confident.
Headers:
Authorization Bearer <my actual token id>
Content-Type application/json
Dropbox-API-Select-Admin. dbmid:<my actual token id for myself as an admin user>
The folder I'm accessing has myself listed as access, and I'm also included in a group that has access.
I've selected all permissions on my app to write/edit everything, generated a new auth token after saving, and I still have issues.
Any help is much appreciated. I'm happy to provide any additional information as well.
Thanks in advance!
It looks like you meant to call /2/files/get_metadata, but based on the error message in the response body you actually called /2/sharing/get_folder_metadata (which takes different parameters, and so the call failed). Make sure you've configured that to call /2/files/get_metadata if that's what you intended.
- DB-DesDropbox Engineer
A "path/not_found" Dropbox API error indicates that the API call failed because there was nothing currently found at the specified
path
in the connected account under the relevant root.Keep in mind that when using an app with the "full Dropbox" access type, API calls default to the member folder, but if you're trying to access the "team space" (only applicable to members of a team with the "team space" configuration), you'll need to configure that as the root explicitly, as covered in the Team Files Guide.
What would be recommended in your specific case is to make sure you're accessing the relevant root. Since you mentioned you are working with a team folder, you will most likely need to include Dropbox-API-Path-Root in your header.
I hope this information provides more clarity!
- Legrend_SargentpcExplorer | Level 3
Hi Des!
Thanks for the help. My goal is to add a member to a team folder found in step 1. The error message I get on step 4 is this: argument of type 'NoneType' is not iterable
I kept having to refresh my access token and have since switched over to the new Zapier API Dropbox (Beta) which refreshes tokens automatically.
I switched the logic flow to the below but am stuck on step 4, but I think step 3 might be wrong too. Any help is appreciated again. Thank you!- Find folder - to search for a specific folder by name
- API run of get_current_account - in order to find my companies dropbox base folder.
- API call of get_metadata - with the Dropbox-API-Path-Root, and the path from step 1 as a query argument. Code for this below:
Header added: Dropbox-API-Path-Root:
{".tag": "root", "root": "<response_data_root_info_root_namespace_id from step 2>"}
{ "include_deleted": false, "include_has_explicit_shared_members": false, "include_media_info": false, "path": "<path ID from step 1>" }
- API call of add_folder_member - to add a specific member to the folder from step 1. This uses the "parent shared folder ID" I from 3 to add the member to the folder in step 1, but I think this is wrong as it should just be "shared folder ID". Code data below:
{ "members": [ { "access_level": "editor", "member": { ".tag": "dropbox_id", "dropbox_id": "dbmid:<memberID pulled from another API call>" } } ], "quiet": false, "shared_folder_id": "response__data__sharing_info__parent_shared_folder_id from step 3" }
- Greg-DBDropbox Staff
The error "argument of type 'NoneType' is not iterable" is not actually an error from the Dropbox API itself, so we can't offer too much help with that in particular. That said, the error indicates that a particular object is unexpectedly None and so cannot be iterated over; you'd need to determine what object in your environment that is and why it is None.
As for the Dropbox side of this, "parent shared folder ID" and "shared folder ID" both refer to the same kind of identifier. The term "parent shared folder ID" is used for something contained in a shared folder (e.g., since a file cannot itself be a shared folder but can be in a shared folder), and the term "shared folder ID" would be used for a shared folder itself. (Likewise, a "team folder ID" is also just a type of "shared folder ID".)
Anyway, it's worth mentioning that it's ambiguous what exactly you're doing in step one, but you may be able to simplify this process somewhat. If step one gives yous the metadata for the shared (or team) folder itself, you could get the shared folder ID from there directly, for use with /2/sharing/add_folder_member.
About Dropbox API Support & Feedback
Find help with the Dropbox API from other developers.
5,882 PostsLatest Activity: 3 years agoIf 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!