MusicKit API returns 500 Internal Server Error despite valid JWT and setup

My app is properly configured with MusicKit. I've generated a JWT using my valid credentials (Team ID, Key ID, private key), and I’ve ensured the time settings are correct via NTP.

When I call: https://api.music.apple.com/v1/catalog/jp/search?term=ado&types=songs

I consistently receive a 500 Internal Server Error.

The JWT is generated using ES256 with valid iat and exp values. I’ve confirmed the token decodes properly using jwt.io, and it's passed via the Authorization: Bearer header.

Things I’ve confirmed:

  • Key ID, Team ID, private key are correct
  • App ID is configured with MusicKit capability
  • JWT is generated and signed correctly
  • macOS time is synced via NTP
  • Used both curl and Python to test — same result

Is there anything else I should check on the Apple Developer Console (like App ID, Certificates, or provisioning profile)?
Or could this be a backend issue on Apple’s side?

Any guidance would be appreciated.

Answered by DTS Engineer in 847913022

Our engineering teams need to investigate this issue, as resolution may involve changes to Apple's software. Please file a bug report, include a small sample project and some directions that can be used to reproduce the problem, and post the Feedback number here once you do. If you post the Feedback number here I'll check the status next time I do a sweep of forums posts where I've suggested bug reports.

Bug Reporting: How and Why? has tips on creating your bug report.

Accepted Answer

Our engineering teams need to investigate this issue, as resolution may involve changes to Apple's software. Please file a bug report, include a small sample project and some directions that can be used to reproduce the problem, and post the Feedback number here once you do. If you post the Feedback number here I'll check the status next time I do a sweep of forums posts where I've suggested bug reports.

Bug Reporting: How and Why? has tips on creating your bug report.

Feedback ID: FB18791873
I've submitted a bug report with a sample project and reproduction steps.
Looking forward to any updates. Thank you!

Your bug report has been returned with the following comments:

The MusicKit API for Apple platforms (“MusicKit.framework”) does not require you to manually supply a MusicKit Web API JWT.

After being granted permission to access the Apple Music library + catalog via MusicAuthorization.request(), any requests made by the MusicKit.framework automatically have the necessary authentication headers.

To make the same HTTP request with MusicKit.framework auth, use MusicDataRequest, the MusicKit-equivalent of URLRequest: https://developer.apple.com/documentation/musickit/musicdatarequest.

However, I’d encourage you to use the existing structured requests that we provide where possible. For example, to make the same search request as your sample project, use MusicCatalogSearchRequest: let request = MusicCatalogSearchRequest(term: “ado”, types: [Song.self]) let response = try await request.response() (https://developer.apple.com/documentation/musickit/musiccatalogsearchrequest)

Some additional resources:

MusicKit API returns 500 Internal Server Error despite valid JWT and setup
 
 
Q