Dropbox API Support & Feedback
Find help with the Dropbox API from other developers.
Below is the scenario we need to acheive.
Whenever a file is deleted from the dropbox the same should be removed from our database as well.
In our database we are storing the id of the file rather than the path, so that the filename is renamed or file is moved we don't miss the file link and can download the file.
We implemented webhooks for getting the deleted files. In the entries of deleted files {.tag = 'deleted'}, we are not getting the meta data (id of the file). So we could not map the database record with the deleted entry from the dropbox which we received by webhook implementation.
We tried to use the meta data and file download api to get the ID of the file but since the file is not present in the path we are getting { ".tag": "not_found" } or 402 conflict message. How to get the file id for a deleted file?
The Dropbox API doesn't return the file/folder ID for DeletedMetadata, but I'll pass this along as a feature request.
You can call /2/files/list_revisions with the path from the DeletedMetadata to get the history of the file at that though, including the file ID(s).
Alternatively, you can store the path and id for the each last (File|Folder)Metadata you saw, so that when you get a DeletedMetadata, you can check what the last known file ID was for that path.
The Dropbox API doesn't return the file/folder ID for DeletedMetadata, but I'll pass this along as a feature request.
You can call /2/files/list_revisions with the path from the DeletedMetadata to get the history of the file at that though, including the file ID(s).
Alternatively, you can store the path and id for the each last (File|Folder)Metadata you saw, so that when you get a DeletedMetadata, you can check what the last known file ID was for that path.
Hi Greg,
Thank you for quick turnaround. As you suggested storing the path in DB and using the same for doing the deletion should do since the file_id changes every time we change the revision, rename the file or move the file.
Hi there!
If you need more help you can view your support options (expected response time for a 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!