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
Amiram
7 years agoNew member | Level 2
Delete does not work on files
hey guys i'm trying to delete a file and always get `path_lookup/not_found/..`
the code is:
import requests import json url = "https://api.dropboxapi.com/2/files/delete_v2" headers = { "Authorization": "Bearer <access-token>",
"Content-Type": "application/json",
"Dropbox-Api-Select-Admin":
"dbmid:AADnRVGZHenLtFbLVdHDkqEJg3Dou4hWF4g" }
data = { "path": "id:Kd_cXYig9pAAAAAAAAAAQw" }
r = requests.post(url, headers=headers, data=json.dumps(data))
further more https://dropbox.github.io/dropbox-api-v2-explorer/#files_delete
only lets you try the deprecated api call. trying on stackoverflow as well: https://stackoverflow.com/questions/52368896/cant-delete-files-using-a-dropbox-business-team-token
Does that file exist in the "team space"? By default, API calls will only look in "member folders", so this code won't work if the file is in the team space. To operate in the team space, you need to set the 'Dropbox-API-Path-Root' header. You can find information on how to do this in the Namespace Guide:
https://www.dropbox.com/developers/reference/namespace-guide
(And thanks for the note on the API Explorer being outdated! I'll ask the team to update it.)
- AmiramNew member | Level 2
edited the main comment
- Greg-DBDropbox Staff
Does that file exist in the "team space"? By default, API calls will only look in "member folders", so this code won't work if the file is in the team space. To operate in the team space, you need to set the 'Dropbox-API-Path-Root' header. You can find information on how to do this in the Namespace Guide:
https://www.dropbox.com/developers/reference/namespace-guide
(And thanks for the note on the API Explorer being outdated! I'll ask the team to update it.)
About Dropbox API Support & Feedback
Find help with the Dropbox API from other developers.
5,911 PostsLatest Activity: 59 minutes 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!