For dataset collections and datasets within collections you have to supply your API key with the request. You can add it to the end of the collection download url, the command would look something like this:
$ wget https://usegalaxy.org/api/dataset_collections/d20ad3e1ccd4595de/download?key=MYSECRETAPIKEY (note the ?key= before the API key itself)
I updated our docs at https://galaxyproject.org/support/download-data to reflect this requirement.
If the dataset is a complete collection or in a collection
see Martin's answer below
If the dataset is a single dataset:
Please double check your usage and try both curl and wget. One of these should work for everyone -- but both will not work for everyone. Full options: https://galaxyproject.org/support/download-data/#download-tip-big-data
$ curl -o outfile --insecure '<link>' # ignore SSL certificate warnings
$ wget -O --no-check-certificate '<link>' # ignore SSL certificate warnings
Please let us know if single dataset download is a problem you cannot resolve. We'll want to follow up on where you are working, what the datatype of the dataset is, confirm your command-line syntax, etc. to test and see if there is another server download issue going on.
Thanks! Jen, Galaxy team