You might see that the Dropbox Community team have been busy working on some major updates to the Community itself! So, here is some info on what’s changed, what’s staying the same and what you can expect from the Dropbox Community overall.
Forum Discussion
elsigh
5 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 ...
- 5 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
5 years agoDropbox Staff
The /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.
- elsigh5 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-DB5 years agoDropbox Staff
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'
- elsigh5 years agoHelpful | Level 5
Thank you so much, totally works!
About Dropbox API Support & Feedback
Find help with the Dropbox API from other developers.5,916 PostsLatest Activity: 2 days ago
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 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!