I can use the v2 API to start a report, wait until it is finished, and get a link to the report, all using curl.
But when I try to download the report from the link using curl, curl says:
curl: (3) URL rejected: Port number was not a decimal number between 0 and 65535
(I’m not sure the problem is really the port number (since there isn’t one in the link that I can find – there are no colons other than the one in “https:”) but the curl man page says a code of 3 means “URL malformed. The syntax was not correct.”)
Here’s the curl command I use in a shell script:
curl --no-progress-meter \
-X GET $download_link \
> /tmp/curl_stdout 2> /tmp/curl_stderr
If I paste the link into Safari, the returned document is XML, and starts with:
<Error>
<Code>SignatureDoesNotMatch</Code>
<Message>The request signature we calculated does not match the signature you provided. Check your key and signing method.</Message>
The link itself looks like this:
https://crowdin-tmp.downloads.crowdin.com/*****/top-members/*****.csv?response-content-disposition=attachment%3B%20filename%3D%22Tunnelblick.top-members.words.af.report.csv%22&X-Amz-Content-Sha256=UNSIGNED-PAYLOAD&X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Credential=*****%2F20231123%2Fus-east-1%2Fs3%2Faws4_request&X-Amz-Date=20231123T034827Z&X-Amz-SignedHeaders=host&X-Amz-Expires=3600&X-Amz-Signature=*****
(The first ******** is an 8-digit integer, the second ***** is a 34-character UUID, the third ***** is a 20-character code of some sort, and the last ***** is 64 hex characters.
Any suggestions?