cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
Announcements
We are making some updates so the Community might be down for a few hours on Monday the 11th of November. Apologies for the inconvenience and thank you for your patience. You can find out more here.

Dropbox API Support & Feedback

Find help with the Dropbox API from other developers.

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Re: Zapier - 409 error path/not found

Zapier - 409 error path/not found

Legrend_Sargentpc
Explorer | Level 3
Go to solution

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!
1 Accepted Solution

Accepted Solutions

Greg-DB
Dropbox Staff
Go to solution

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.

View solution in original post

12 Replies 12

DB-Des
Dropbox Engineer
Go to solution

Hi @Legrend_Sargentpc,

 

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_Sargentpc
Explorer | Level 3
Go to solution

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!

 

  1. Find folder - to search for a specific folder by name
  2. API run of get_current_account - in order to find my companies dropbox base folder.
  3. 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-DB
Dropbox Staff
Go to solution

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.

Legrend_Sargentpc
Explorer | Level 3
Go to solution

Hi Greg,

 

That's for clearing up the shared_id vs parent_shared_ID.

 

In step 1, I'm getting a specific file location. It's a dropbox/zapier event that returns the following:

  • ID:  (ex. id:somerandomechars23432)
  • Path: (ex. /baseroot/subfolder1/subfolder2
  • ShareLink: (http: link we use to share for our clients)
  • is deleted: t/f
  • is shared: t/f
  • no access: t/f
  • is dir: t/f

So, I have found a folder "ID", but not the "shared_folder_id" which seems necessary for the add_folder_member api call.  I'm then trying to pull the meta data from that "ID", so I can get the shared_folder_Id to be used in add_folder_member.  

 

I think my issue is showing that the get_meta_data is returning a error 400 even though Zapier is saying it went through correctly. (not sure though).  Pictures below to show what I put it, and what came out. (Not sure why they are posted backwards, but I couldn't change it.)


Thanks again for all the help!

 

Screenshot 2024-09-30 at 9.18.47 AM.png

Screenshot 2024-09-30 at 9.19.00 AM.png

Greg-DB
Dropbox Staff
Go to solution

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.

Legrend_Sargentpc
Explorer | Level 3
Go to solution

Hi Greg,


That helped fix that error. I can't believe I missed that! I'm still getting the none type issue on the next step, but I have a feeling it's time to ask Zapier what's going on, because passing a hardcoded variable is still showing the same thing.


Thanks so much for your help!

bblu2095
Collaborator | Level 8

Did you end up figuring this out? I am also receiving this error, though it seems like the action is successful ("Dropbox folder is shared properly").

Legrend_Sargentpc
Explorer | Level 3

Not entirely.   Which specific issue are you having, because I had a few coupled together. 

If you send over what you have and I'd be happy to take a look and see if I can help get you to the next step.

bblu2095
Collaborator | Level 8
Go to solution

It looks like the issue I'm having is that the API request is returning "Null" instead of an "OK" or something like. This is by design according to the API documentation.

 

Zapier doesn't seem to have a way to deal with these API requests at the moment. Have you found a way around that?

Need more support?