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
denrev
7 years agoNew member | Level 2
Traverse a shared folder
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]
- Greg-DBDropbox Staff
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.
- denrevNew member | Level 2
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!
- Greg-DBDropbox StaffThanks for following up. To clarify though, I've sent this request along to the team, but I can't guarantee if or when that would be implemented.
About Dropbox API Support & Feedback
Find help with the Dropbox API from other developers.
5,910 PostsLatest Activity: 3 days agoIf 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!