Dropbox API Support & Feedback
Find help with the Dropbox API from other developers.
Given a shared link (ie https://www.dropbox.com/sh/koc0ymsn8lxk2sh/AAAS28iWSscFFzg3u6bZ6QB7a?dl=0) from the account I don't own, my goal is to produce a list of download links for the files inside the given folder and later download them. Note that I don't want a zip of the folder - customer UX would allow to unselect separate files and I want to download selected only (so `?dl=1`) doesn't work for me.
I can list items inside the folder with https://dropbox.github.io/dropbox-api-v2-explorer/#files_list_folder. Each item has an ID (ie id:jbYYPFO7EXYAAAAAAATVmn) and a `parent_shared_folder_id` (ie 1498401). I also have names of the files inside.
- sharing_get_file_metadata returns "invalid id" for amy ID I get
- sharing_get_folder_metadata also fails with `parent_shared_folder_id` fetched above
- I tried to `mount` the folder.
There is literally no way to do anything with information from `list_folder`.
How can I get download links for files shared with me inside a folder?
Thanks!
[Note: I mangled links on purpose and they are just to indicate the format of the link I use]
When using /2/files/list_folder to list the contents of a folder via a shared link like this, the intent is that you can use the resulting paths for the files/folders under that folder with /2/sharing/get_shared_link_file and/or /2/sharing/get_shared_link_metadata, i.e., by supplying the `url` and `path` (relative to the folder) to get the child file or metadata. (The get_file_metadata and get_folder_metadata endpoints are for different types of sharing, so they don't apply here.)
The /2/sharing/get_shared_link_file endpoint will let you get the file data directly, but there isn't a way to get a shared link for the nested file unfortunately. I'll send this along to the team though to see if we can get that added in the future.
Direct access to the binary is great, this works for the second step I want to do - thanks!
For the first step, I would still need a direct link and thumbnail if possible to render it properly. For now the solution is to construct a URL of kind `?dl=0&preview=<filename>` to have the links.
Ability to have to download links will be much appreciated - looking forward for it!
Update: The Dropbox API now returns the shared link for the nested item as 'url' when requesting the metadata for that item using the "path" parameter on /2/sharing/get_shared_link_metadata (instead of the original parent link).
The way we work is changing. Share and discover new ways to work smarter with Dropbox in our community.
Sound good? Let's get started.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 Twitter or Facebook.
For more info on available support options, see this article.
If you found the answer to your question, please 'like' the post to say thanks to the user!