Curious about A, B, C, and D drives? Learn what they mean and how to use them effectively with Dropbox in this handy guide! - check it out now!

Forum Discussion

nsadeh's avatar
nsadeh
New member | Level 2
3 years ago

2/files/get_metadata 409 with ID path

We are trying to access a file metadata using the above endpoint with the following request:

```

"request": {
"url": "https://api.dropboxapi.com/2/files/get_metadata ",
"body": {
"include_deleted": false,
"include_has_explicit_shared_members": false,
"include_media_info": false,
"path": "id:1tGO8wuhnv8AAAAAAAAAGQ"
},
"config": {
"headers": {
"Authorization": "Bearer <REDACTED>"
}
}
},
"response": {
"status": 409,
"status_text": "Conflict",
"data": {
"error_summary": "path/not_found/...",
"error": {
".tag": "path",
"path": {
".tag": "not_found"
}
}
},
"headers": {
"cache-control": "no-cache",
"content-security-policy": "sandbox allow-forms allow-scripts",
"x-content-type-options": "nosniff",
"content-type": "application/json",
"accept-encoding": "identity,gzip",
"date": "Tue, 30 Aug 2022 21:45:06 GMT",
"server": "envoy",
"content-length": "97",
"x-dropbox-response-origin": "far_remote",
"x-dropbox-request-id": "a6afca255af5441ba933b901c94b1494",
"connection": "close"
}
},

```

 

We were under the impression that this should work based off the documentation: https://www.dropbox.com/developers/documentation/http/documentation#files-get_metadata

 

This is to resolve an issue where a file is being retrieved by someone who has full edit/read access to a file, but the file was made and shared by an admin, in which case the API get_shared_link_metadata doesn't return the path information so we can't use that.

  • Greg-DB's avatar
    Greg-DB
    Icon for Dropbox Staff rankDropbox Staff

    It sounds like the file in question may be in the "team space". By default, API calls operate in the "member folder" of the connected account, not the team space, so by default files in the team space will not be found and will result in an error like this. You can configure API calls to operate in the team space instead though. To do so, you'll need to set the "Dropbox-Api-Path-Root" header. You can find information on this in the Team Files Guide.