Cut the Clutter: Test Ignore Files Feature - sign up to become a beta tester here.

Forum Discussion

flyingmonk2231's avatar
flyingmonk2231
Explorer | Level 4
5 years ago
Solved

Downloading Dropbox files using curl or wget

I prefer working on a Linux instance through an SSH session. How could I download the Dropbox files directly from the link through a terminal command?

 

I tried  the following but it does not work:

curl https://www.dropbox.com/t/jdejjd83827HDHH?dl=1 -o test.zip -J -L -k

 

The link in the example above is a made-up link. But the format of the links I receive from a provider is similar. 

 

Could someone help? 

  • Здравко's avatar
    Здравко
    5 years ago

    flyingmonk2231 wrote:
    ...

    On the Windows platform, when I click this link (which looks like this https://www.dropbox.com/t/<an alphanumeric string>), it takes me to a Dropbox Transfer web page in my internet browser. ...


    Hi flyingmonk2231,

    The link you are looking on is a transfer link (not a shared link as far Elixir gets confused). Shared link could be previewed or downloaded (depending on link's GET parameter). Transfer link don't have ability for GET download, unfortunately (either with or without GUI). The transfer link you have received can be only viewed (and downloaded from there, of course). Actual download link is a POST https://dl-web.dropbox.com/zip_archive_token_download (not GET). Parameter describing downloaded content (archive_token) isn't accessible in advance. Let's hope such a opportunity will be added.

    Hope this adds clarity.

9 Replies

Replies have been turned off for this discussion
  • Elixir's avatar
    Elixir
    Star | Level 19
    5 years ago

    For me the following are working: 

    wget https://www.dropbox.com/s/ew2jket9lisdf4oor/example.zip
    wget https://www.dropbox.com/s/d34o4xoo7c6bnfh3r/example.pptx

    Notice that I removed the `?dl=1` part from the shared link, otherwise the filenames are appened with that. 

  • flyingmonk2231's avatar
    flyingmonk2231
    Explorer | Level 4
    5 years ago

    Thanks for your response.

     

    I must apologize for stating "files" in my first question. The link is for a folder, and because it contains huge files, the transfer was shared through a Dropbox Transfer link. 

     

    On the Windows platform, when I click this link (which looks like this https://www.dropbox.com/t/<an alphanumeric string>), it takes me to a Dropbox Transfer web page in my internet browser. There the address bar shows a totally different address. It looks like this "https://www.dropbox.com/transfer/<an alphanumeric string>".  At the center of the window,  I see a box-like in the image below. After I click the download symbol (downward facing arrow with a bar below it), the download starts with a ZIP file format. If I click the copy link button in the top right corner, I get the first link back. So this is just taking me in a vicious circle. I cannot peek into the folder for downloading individual files using the wget command.

     

    I hope this information helps me get some answers. Again, I am looking for a link for this folder that will allow me to download it to a Linux instance with no GUI support.

     

     

  • Elixir's avatar
    Elixir
    Star | Level 19
    5 years ago

    You can try zipping the folder before uploading and then share the link of the zip file. When we download a folder, the dropbox server needs to do the zipping, I think there is no static link available to that zip file.

  • flyingmonk2231's avatar
    flyingmonk2231
    Explorer | Level 4
    5 years ago

    Zipping the folder could be one solution. However, for larger files, I think Dropbox Transfer may create dynamic links all the time. So wget may not work at all.

     

    Can someone from Dropbox help me out? How can I get this topic under their radar?

  • Greg-DB's avatar
    Greg-DB
    Icon for Dropbox Community Moderator rankDropbox Community Moderator
    5 years ago

    Thanks for the post! Dropbox unfortunately does not offer a way to programmatically download from Transfer links like this, but I'll pass this along as a feature request. I can't promise if or when that might be implemented though. 

  • Здравко's avatar
    Здравко
    Legendary | Level 20
    5 years ago

    flyingmonk2231 wrote:
    ...

    On the Windows platform, when I click this link (which looks like this https://www.dropbox.com/t/<an alphanumeric string>), it takes me to a Dropbox Transfer web page in my internet browser. ...


    Hi flyingmonk2231,

    The link you are looking on is a transfer link (not a shared link as far Elixir gets confused). Shared link could be previewed or downloaded (depending on link's GET parameter). Transfer link don't have ability for GET download, unfortunately (either with or without GUI). The transfer link you have received can be only viewed (and downloaded from there, of course). Actual download link is a POST https://dl-web.dropbox.com/zip_archive_token_download (not GET). Parameter describing downloaded content (archive_token) isn't accessible in advance. Let's hope such a opportunity will be added.

    Hope this adds clarity.

  • CaptainApp's avatar
    CaptainApp
    New member | Level 2
    4 years ago

    I've noticed that there are older forum posts available online (4 years) that show a method of doing this by copying the link that the GUI brings up. It would seem Dropbox has actively worked to prevent this from being possible. 

     

    As much as this is an inconvenience to me right this second. It's easy to see how this as a feature would create use cases for transfer out of the scope of what was originally intended. As such I understand Dropbox's decision. Despite the frustration.

     

     

About Dropbox API Support & Feedback

Node avatar for Dropbox API Support & Feedback
Find help with the Dropbox API from other developers.6,039 PostsLatest Activity: 2 days ago
415 Following

The Dropbox Community team is active from Monday to Friday. We try to respond to you as soon as we can, usually within 2 hours.

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!