'Trouble downloading ADYEN report

I'm using this script:

wget -O C:\FlairnetLab\output\x.csv --http-user='[My User]' --http-password='[Password]' --no-check-certificate https://ca-test.adyen.com/reports/download/MerchantAccount/FlairnetECOM/payments_accounting_report_2021_06_10.csv

But i get no file found response. But if i type the url in the browser using the same credential i can download the file.

Can some help me?



Solution 1:[1]

The problem is likely to be the encoding of the credentials (both Adyen-generated username and password include several special characters).

An option is to generate the base64-encoded string username: password with a command line (or with an online generator)

# example on Mac
$ echo -n '<username>:<password>' | openssl base64
cmVwb3J0.......5LX4=

then pass it in the Authorization header

# example with wget
wget --header "Authorization: Basic cmVwb3J0.......5LX4=" https://ca-test.adyen.com/reports/download/MerchantAccount/MyMerchantAccount/payments_accounting_report_2021_01_01.csv

# example with curl
curl -H "Authorization: Basic cmVwb3J0.......5LX4=" -X GET https://ca-test.adyen.com/reports/download/MerchantAccount/MyMerchantAccount/payments_accounting_report_2021_01_01.csv

Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source
Solution 1