Unable to download release asset via API

For starters, I’m able to successfully view a release so auth is working as expected.

curl --location --header "PRIVATE-TOKEN: $GITLAB_TOKEN" "https://gitlab.com/api/v4/projects/54335013/releases/0.05"

But when I try to download an asset from that release I’m redirected multiple times and end up receiving HTML for a sign in page. I’m attempting to use this API: Releases API | GitLab.

curl -v --location --header "PRIVATE-TOKEN: $GITLAB_TOKEN" "https://gitlab.com/api/v4/projects/54335013/releases/0.05/downloads/shipium-auth_0.05_darwin_arm64.tar.gz"

*   Trying 172.65.251.78:443...
* Connected to gitlab.com (172.65.251.78) port 443
…
* [HTTP/2] [1] OPENED stream for https://gitlab.com/api/v4/projects/54335013/releases/0.05/downloads/shipium-auth_0.05_darwin_arm64.tar.gz
* [HTTP/2] [1] [:method: GET]
* [HTTP/2] [1] [:scheme: https]
* [HTTP/2] [1] [:authority: gitlab.com]
* [HTTP/2] [1] [:path: /api/v4/projects/54335013/releases/0.05/downloads/shipium-auth_0.05_darwin_arm64.tar.gz]
* [HTTP/2] [1] [user-agent: curl/8.4.0]
* [HTTP/2] [1] [accept: */*]
* [HTTP/2] [1] [private-token: ****
> GET /api/v4/projects/54335013/releases/0.05/downloads/shipium-auth_0.05_darwin_arm64.tar.gz HTTP/2
> Host: gitlab.com
> User-Agent: curl/8.4.0
> Accept: */*
> PRIVATE-TOKEN: ****
> 
< HTTP/2 302 
< date: Sat, 24 Feb 2024 02:26:28 GMT
< content-type: text/plain
< content-length: 186
< location: https://gitlab.com/shipium-corp/engineering/shipium-auth-cli/uploads/db74dfbdacf78a48b83110da38d06fad/shipium-auth_0.05_darwin_arm64.tar.gz
…
* Ignoring the response-body
* Connection #0 to host gitlab.com left intact
* Issue another request to this URL: 'https://gitlab.com/shipium-corp/engineering/shipium-auth-cli/uploads/db74dfbdacf78a48b83110da38d06fad/shipium-auth_0.05_darwin_arm64.tar.gz'
…
* [HTTP/2] [3] [:method: GET]
* [HTTP/2] [3] [:scheme: https]
* [HTTP/2] [3] [:authority: gitlab.com]
* [HTTP/2] [3] [:path: /shipium-corp/engineering/shipium-auth-cli/uploads/db74dfbdacf78a48b83110da38d06fad/shipium-auth_0.05_darwin_arm64.tar.gz]
* [HTTP/2] [3] [user-agent: curl/8.4.0]
* [HTTP/2] [3] [accept: */*]
* [HTTP/2] [3] [private-token: ****
> GET /shipium-corp/engineering/shipium-auth-cli/uploads/db74dfbdacf78a48b83110da38d06fad/shipium-auth_0.05_darwin_arm64.tar.gz HTTP/2
> Host: gitlab.com
> User-Agent: curl/8.4.0
> Accept: */*
> PRIVATE-TOKEN: ****
> 
< HTTP/2 302 
< date: Sat, 24 Feb 2024 02:26:28 GMT
< content-type: text/html; charset=utf-8
< location: https://gitlab.com/users/sign_in
…

Any ideas on what’s wrong with this request?