We’re Still Here to Help (Even Over the Holidays!) - find out more here.
Forum Discussion
Gonzo345
9 years agoHelpful | Level 5
Deleting a file using a Shared Link through the API
Hi there:
I'm brand new with the Dropbox API for .NET and I've made my steps forward.
The thing is that we want to work with shared links in terms of deleting files. I know I can use the
DropboxClient.Files.DeleteAsync(remoteRoute);
That would delete the file if I know the route it has, but... What about if I just know the link but I have full access to the account through the API? I mean, I could download the file (using the Files.DownloadAsync), but I couldn't delete the file unless I have the file route, which is not being provided if I recover the file through the shared link...
Thanks for all in advance. Mastering this official API is being... interesting :grin:
Gonzo345.
You can use GetSharedLinkMetadataAsync to get the metadata for a shared link. You can then use the returned SharedLinkMetadata.PathLower to delete the file.
2 Replies
- Greg-DB9 years ago
Dropbox Community Moderator
You can use GetSharedLinkMetadataAsync to get the metadata for a shared link. You can then use the returned SharedLinkMetadata.PathLower to delete the file.
- Gonzo3459 years agoHelpful | Level 5Thank you so much for this answer! This made my day, Greg!
Have a nice day, DropBoss!
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!