apple-music-token-generator
apple-music-token-generator copied to clipboard
Whatever I do I just get 500 error from Apple Music API
I've successfully created a token, but any request just ends with 500. For example:
➜ applemusic curl -v -H 'Authorization: Bearer eyJhbGciOiJFUzI1NiIsInR5cCI6IkpXmodifiedsifQ.eyJpc3MiOiI5U1g3SDJYUzlLIiwiZXhwIjoxNjUxMjQzMzQzLCJpYXQiOjE2MzU0NjYzNDN9.uxnoh6RG8YLEhHHTa92AomLUmc7ynEvgEisGfLEdoyGN5RxY0pmstEGY5v-VhIXm39-HyclneJwobcBQdItvag' "https://api.music.apple.com/v1/catalog/ru/songs/203709340"
* Trying 104.103.64.25...
* TCP_NODELAY set
* Connected to api.music.apple.com (104.103.64.25) port 443 (#0)
* ALPN, offering h2
* ALPN, offering http/1.1
* successfully set certificate verify locations:
* CAfile: /etc/ssl/cert.pem
CApath: none
* TLSv1.2 (OUT), TLS handshake, Client hello (1):
* TLSv1.2 (IN), TLS handshake, Server hello (2):
* TLSv1.2 (IN), TLS handshake, Certificate (11):
* TLSv1.2 (IN), TLS handshake, Server key exchange (12):
* TLSv1.2 (IN), TLS handshake, Server finished (14):
* TLSv1.2 (OUT), TLS handshake, Client key exchange (16):
* TLSv1.2 (OUT), TLS change cipher, Change cipher spec (1):
* TLSv1.2 (OUT), TLS handshake, Finished (20):
* TLSv1.2 (IN), TLS change cipher, Change cipher spec (1):
* TLSv1.2 (IN), TLS handshake, Finished (20):
* SSL connection using TLSv1.2 / ECDHE-RSA-AES256-GCM-SHA384
* ALPN, server accepted to use h2
* Server certificate:
* subject: businessCategory=Private Organization; jurisdictionCountryName=US; jurisdictionStateOrProvinceName=California; serialNumber=C0806592; C=US; ST=California; L=Cupertino; O=Apple Inc.; OU=management:idms.group.1208920; CN=itunes.apple.com
* start date: Jun 22 11:27:51 2021 GMT
* expire date: Jul 22 11:27:50 2022 GMT
* subjectAltName: host "api.music.apple.com" matched cert's "api.music.apple.com"
* issuer: C=US; O=Apple Inc.; CN=Apple Public EV Server RSA CA 2 - G1
* SSL certificate verify ok.
* Using HTTP2, server supports multi-use
* Connection state changed (HTTP/2 confirmed)
* Copying HTTP/2 data in stream buffer to connection buffer after upgrade: len=0
* Using Stream ID: 1 (easy handle 0x7f8a9b80ba00)
> GET /v1/catalog/ru/songs/203709340 HTTP/2
> Host: api.music.apple.com
> User-Agent: curl/7.64.1
> Accept: */*
> Authorization: Bearer eyJhbGciOiJFUzI1NiIsInR5cCI6IkpXVCIsImtpZCI6IjhOSDJRQzlXQ0sifQ.eyJpc3MiOiI5U1g3SDJYUzlLIiwiZXhwIjoxNjUxMjQzMzQzLCJpYXQiOjE2MzU0NjYzNDN9.uxnoh6RG8YLEhHHTa92AomLUmc7ynEvgEisGfLEdoyGN5RxY0pmstEGY5v-VhIXm39-HyclneJwobcBQdItvag
>
* Connection state changed (MAX_CONCURRENT_STREAMS == 100)!
< HTTP/2 500
< content-type: application/json; charset=utf-8
< x-apple-application-site: mr
< access-control-allow-origin: *
< x-apple-jingle-correlation-key: NE57E6M5R3ZJ6QO6HAKYD5W3TI
< strict-transport-security: max-age=31536000; includeSubDomains
< date: Fri, 29 Oct 2021 00:15:06 GMT
< x-cache: TCP_MISS from a62-115-252-29.deploy.akamaitechnologies.com (AkamaiGHost/10.4.4-34529956) (-)
<
{"message":"An unexpected error occurred"}
* Connection #0 to host api.music.apple.com left intact
* Closing connection 0
Does anyone has an idea on what should I try? Googling pointed out people with the same problem, but no solution.
Same here with freshly generated tokens.