How to download a file from box using wget?

I might be a bit late to the party, but FWIW:
I tried to do the same things in order to download a folder.
I went to the box UI and opened the browser's network tab on the developer tools. Then I clicked on download and copied as cURL the first link generated, it was something like (removed many headers and options for readability)

curl 'https://app.box.com/index.php?folder_id=122215143745&rm=box_v2_zip_folder'

The response of this request is a json object containing a link for downloading the folder:

{
  "use_zpdl": "true",
  "result": "success",
  "download_url": <somg long url>,
  "progress_reporting_url": <some other url>
}

I then executed wget -L <download_url> and was able to download the file using wget


I was able to download the file by making the link public, then replacing /s/ in the url with /shared/static

So my final command was:

curl -L  https://MYUNI.box.com/shared/static/EXAMPLEtzwosac6pz --output myfile.zip

This can probably be modified for wget.


The solution was to add the -L option to follow the HTTP redirect:

wget -v -O myfile.tgz -L https://ibm.box.com/shared/static/xxxxx.tgz

Tags:

Wget

Box