Dropbox API Support & Feedback
Find help with the Dropbox API from other developers.
Hi
There is shared link for file. If file is deleted then link returns Dropbox page with message:
That file isn’t here anymore
And returned HTTP status for request is 200. For example
https://www.dropbox.com/s/pg29qcvw190eupr/%231111-11.jpg?raw=1
May be, this is good for user. But this does not allow to know programatically that file is absent.
Is there way having shared link to know programatically that file was deleted?
The shared link itself isn't a good interface for this unfortunately, as it will return a 200 showing an HTML error page for the user, as you noted.
Instead, I recommend using the API. You can use the /2/sharing/get_shared_link_metadata endpoint to get information about a shared link:
https://www.dropbox.com/developers/documentation/http/documentation#sharing-get_shared_link_metadata
If the link is still active, you'll get the metadata back. If the file or folder has been deleted, you'll get a 409 with a shared_link_not_found error.
For to use get_shared_link_metadata the access token is needed. Recipient of shared link cannot know access token of file owner.
Is there way to get metadata of shared link without specifying access token?
If this is not possible at current time then, may be, it can be changed?
(Possibility to get metadata of shared link on side of recipient can be useful for some application. And it seems this does not violate security as anyway link allows to get content of 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!