There's an easier way.
Install cliget/CURLWGET from firefox/chrome extension.
Download the file from browser. This creates a curl/wget link that remembers the cookies and headers used while downloading the file. Use this command from any shell to download