cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
Announcements
What’s new: end-to-end encryption, Replay and Dash updates. Find out more about these updates, new features and more here.

Dropbox API Support & Feedback

Find help with the Dropbox API from other developers.

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Is there programatical way to know that shared link is link for deleted file?

Is there programatical way to know that shared link is link for deleted file?

AlexK
New member | Level 2

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 3

Greg-DB
Dropbox Staff

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.

AlexK
New 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-DB
Dropbox Staff
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.
Need more support?
Who's talking

Top contributors to this post

  • User avatar
    Greg-DB Dropbox Staff
  • User avatar
    AlexK New member | Level 2
What do Dropbox user levels mean?