We’re Still Here to Help (Even Over the Holidays!) - find out more here.
Forum Discussion
AlexK
10 years agoNew member | Level 2
Is there programatical way to know that shared link is link for deleted file?
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?
3 Replies
- Greg-DB10 years ago
Dropbox Community Moderator
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.
- AlexK10 years agoNew member | Level 2
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)
- Greg-DB10 years ago
Dropbox Community Moderator
Unfortunately, that endpoint does require an access token. I'll send this along as a feature request to eliminate that requirement, but I can't make any promises.
For reference though, it doesn't need to be an access token for the owner of the link. It can be any user.
About Dropbox API Support & Feedback
Find help with the Dropbox API from other developers.
The Dropbox Community team is active from Monday to Friday. We try to respond to you as soon as we can, usually within 2 hours.
If 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, Facebook or Instagram.
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!