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

denne's avatar
denne
Explorer | Level 3
8 years ago

General URL for many files from 1 shared folder

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

  • Sanchez's avatar
    Sanchez
    Icon for Dropbox Staff rankDropbox Staff
    Hey denne, welcome to our forum! 

    As far as getting these links in a different format… I’m afraid not, because that’s just the way our links work. However, to see if there is something else we can come up with, I require a bit of clarification on what you’d like to be able to do here :thinking:
     
    Can you give me a bit more detail? We may be able to this a different way. 

    Thanks, and have a great weekend :sunglasses:
     
    • denne's avatar
      denne
      Explorer | Level 3

      Hey @Sanchez,

       

      thank you for your feedback.

       

      What I'm trying to do is the following:

      I'd like my code to use the dropbox URL and get files depending from the value of a variable.

      My code is able to get the static part of the dropbbox URL and the variable name of the file (for example, for the Great Britain it is gb.png), but it fails to get the unique key (/s/xxxxxxxxxx).

       

      Example: in case of Great Britain the value of the variable is "gb" 

      - the whole URL is https://dl.dropboxusercontent.com/s/2ct7i7ov5zf6r0z/gb.png?dl=0

      - the static part of the URL is https://dl.dropboxusercontent.com/s/                        ?dl=0

      - the variable part of the URL is 2ct7i7ov5zf6r0z   and gb.png

      My code is able to get the file name ( gb.png ) but not the unique keys ( 2ct7i7ov5zf6r0z )

      Is it somehow possible to create dropbox URL without unique keys (like 2ct7i7ov5zf6r0z) ?

       

      Thank you,

      Denne

       

      • Mark's avatar
        Mark
        Icon for Super User II rankSuper User II
        Is this for an app you are developing Denne?

        If so I'll move this to the API area where the API team may be able to help

About Dropbox API Support & Feedback

Node avatar for Dropbox API Support & Feedback

Find help with the Dropbox API from other developers.

5,910 PostsLatest Activity: 3 days ago
333 Following

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!