We’re Still Here to Help (Even Over the Holidays!) - find out more here.
Forum Discussion
elsigh
6 years agoHelpful | Level 5
Cannot call filesDownload for entries in a sharedLink to a folder (get path_not_found)
My use case is that I have a sharedLink to a folder where I'm not the owner and I'd like to build a little viewer for the contents of the that folder. I can get the list of files in a folder but ...
- 6 years ago
When calling /2/sharing/get_shared_link_file, 'url' would be the shared link URL, and 'path' would be the relative path for the file you want.
So, for your example above, you could use:
'url': 'https://www.dropbox.com/sh/1dj7xiu7s0kgqoo/AADQjza7GmZlOFZk9pk0KHVda?dl=0'
'path': '/Papa Smurf.pro'
Greg-DB
Dropbox Community Moderator
6 years agoThe /2/files/download endpoint only supports downloading files in the connected account, so this error is expected in this case.
For this use case, you'd instead need to use /2/sharing/get_shared_link_file (sharingGetSharedLinkFile).
Both of those only support "user authentication" though, so an access token is necessary. I'll pass this along as a feature request for support for calling without an access token, but I'll pass this along as a feature request. I can't promise if or when that might be implemented though.
Another option would be to download from the shared link itself using the "dl" parameter documented here, but that doesn't offer a way to specify an get only a particular file from the linked folder.
Also, I should note that scraping the Dropbox web site is prohibited by the terms, and subject to break without warning anyway.
elsigh
6 years agoHelpful | Level 5
But `sharingGetSharedLinkFile` requires an URL and all I have in those entries is an `id` (and some other fields, but not `url`) - is there any other way I should go about this? Gracias!
- Greg-DB6 years ago
Dropbox Community Moderator
When calling /2/sharing/get_shared_link_file, 'url' would be the shared link URL, and 'path' would be the relative path for the file you want.
So, for your example above, you could use:
'url': 'https://www.dropbox.com/sh/1dj7xiu7s0kgqoo/AADQjza7GmZlOFZk9pk0KHVda?dl=0'
'path': '/Papa Smurf.pro'
- elsigh6 years agoHelpful | Level 5
Thank you so much, totally works!
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!