cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
Announcements
Want to learn some quick and useful tips to make your day easier? Check out how Calvin uses Replay to get feedback from other teams at Dropbox here.

Dropbox API Support & Feedback

Find help with the Dropbox API from other developers.

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Re: General URL for many files from 1 shared folder

General URL for many files from 1 shared folder

denne
Explorer | Level 3
Go to solution

Hello community,

In my dropbox I have a folder with 200 country flags which I would like to download automatically using the respective URLs.
My problem is that the URL of every single file contains a key which is unique.
Example:
- for the USA flag the URL is https://dl.dropboxusercontent.com/s/rzateuez21i5c95/us.png?dl=0
- for the Gereat Britain flag the URL is https://dl.dropboxusercontent.com/s/2ct7i7ov5zf6r0z/gb.png?dl=0
Every URL consists of four parts: https://dl.dropboxusercontent.com s/XXXXXXXXXXXXX/ FILENAME.FILEFORMAT ?dl=0
So every shared file gets its own key s/XXXXXXXXXXXXX/ which is unique.

Is is it somehow possible to create a URL without this unique key part s/XXXXXXXXXXXXX/ ?
Something like this: https://dl.dropboxusercontent.com/us.png?dl=0

Thank you

12 Replies 12

duckladydinh
Explorer | Level 4
Go to solution

Hi, thank you Grek. K for your very helpful comment. I did not look at the 'get_shared_link_file' and yes, it can fix my current problem. I am sorry for jumping to an early conclusion reconfirmed that the solution works.

Just a little question: Is there any way to do the same for 'folder'?

Greg-DB
Dropbox Staff
Go to solution

@duckladydinh No, unfortunately there currently isn't a way to download a whole sub-folder from a a shared link for a folder via the API, but I'll pass this along as a feature request. I can't promise if or when that might be implemented though. 

Note that you can download the top-level folder as a zip from the shared link as documented here, but that doesn't provide a mechanism for downloading a specific sub-folder.

Greg-DB
Dropbox Staff
Go to solution

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). You could use that to download a specific sub-folder.

Need more support?