Dropbox API Support & Feedback
Find help with the Dropbox API from other developers.
Hi,
I am trying to make a small app which when gets an input of public dropbox URL, returns you the file. But when an invalid URL is entered, the status received is 200. But there is image showing 404. Is there a way or a api through which I could check if the shared link is valid or not?
Moved to the API forum.
Unfortunately, we don't currently have a good way to detect this programmatically, but I'll be sure to pass this along as a request.
The only workaround right now would be to change the hostname from www.dropbox.com to dl.dropboxusercontent.com. The response on the latter would give a success or failure response code, but this isn't documented so it isn't officially supported.
Thanks Gregory! This information helped.
Gregory can you provide a sample link.
For example:
Will this link https://www.dropbox.com/s/t0wnpjojvj6g4dx/Dropbox.pdf?dl=0
become
https://dl.dropboxusercontent.com/s/t0wnpjojvj6g4dx/Dropbox.pdf?dl=0
I tried it and is not working.
What do you mean when you say it's not working? The first version of your link has a 200 code with a 404 page as described earlier in this thread, but the second version of the link does have a 403 code that you can detect programmatically.
In any case, we do have a better way to check links like this now. You can use the API v2 /sharing/get_shared_link_metadata endpoint to get shared link metadata or an error for shared links like this:
https://www.dropbox.com/developers/documentation/http/documentation#sharing-get_shared_link_metadata
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!