Post

Replies

Boosts

Views

Activity

Reply to MusicKit JS authorize() returns AUTHORIZATION_ERROR "Unauthorized" (no Music User Token) — catalog works
Update: solved on my side, and it may be worth checking yours @maurockstar. My site sent "Referrer-Policy: no-referrer" on every page. With that policy the authorize.music.apple.com popup gets an empty document.referrer and can't hand the Music User Token back, so authorize() fails with AUTHORIZATION_ERROR "Unauthorized" right after Allow. Changing the header to "Referrer-Policy: strict-origin" fixed it immediately, on the same 3.2526.0-prerelease build. Check your server headers, any <meta name="referrer"> tag in the page, and rel="noreferrer" on links. (Credit to the vibez project, which hit the same problem: github.com/simonepelosi/vibez/issues/182)
Topic: Media Technologies SubTopic: Audio Tags:
2w
Reply to MusicKit JS authorize() returns AUTHORIZATION_ERROR "Unauthorized" (no Music User Token) — catalog works
hi @maurockstar, did this ever get solved for you? I am having the same problem on the same MusicKit version. Apple peeps: Seeing the same issue on my new developer account. authorize() rejects with AUTHORIZATION_ERROR right after the user clicks Allow; webPlayerLogout then returns 403 with x-apple-music-user-token: undefined. Catalog requests with the same key work, and the same Apple Account plays fine on music.apple.com. MusicKit JS served: 3.2526.0-prerelease.x Safari 26.5.2 (macOS) and Chrome 137 Fails from both http://localhost and a public https origin, with and without an origin claim in the developer token Key created 2026-11-06; still failing more than 24 hours later Example: x-apple-request-uuid 2e09b472-01c7-510a-b4e6-16eda612a7ee (2026-11-06 18:34:23 GMT) Filed as FB25477648 with a sysdiagnose attached. I've also contacted Developer Support. Happy to share more details.
Topic: Media Technologies SubTopic: Audio Tags:
2w
Reply to MusicKit JS authorize() returns AUTHORIZATION_ERROR "Unauthorized" (no Music User Token) — catalog works
Update: solved on my side, and it may be worth checking yours @maurockstar. My site sent "Referrer-Policy: no-referrer" on every page. With that policy the authorize.music.apple.com popup gets an empty document.referrer and can't hand the Music User Token back, so authorize() fails with AUTHORIZATION_ERROR "Unauthorized" right after Allow. Changing the header to "Referrer-Policy: strict-origin" fixed it immediately, on the same 3.2526.0-prerelease build. Check your server headers, any <meta name="referrer"> tag in the page, and rel="noreferrer" on links. (Credit to the vibez project, which hit the same problem: github.com/simonepelosi/vibez/issues/182)
Topic: Media Technologies SubTopic: Audio Tags:
Replies
Boosts
Views
Activity
2w
Reply to MusicKit JS authorize() returns AUTHORIZATION_ERROR "Unauthorized" (no Music User Token) — catalog works
hi @maurockstar, did this ever get solved for you? I am having the same problem on the same MusicKit version. Apple peeps: Seeing the same issue on my new developer account. authorize() rejects with AUTHORIZATION_ERROR right after the user clicks Allow; webPlayerLogout then returns 403 with x-apple-music-user-token: undefined. Catalog requests with the same key work, and the same Apple Account plays fine on music.apple.com. MusicKit JS served: 3.2526.0-prerelease.x Safari 26.5.2 (macOS) and Chrome 137 Fails from both http://localhost and a public https origin, with and without an origin claim in the developer token Key created 2026-11-06; still failing more than 24 hours later Example: x-apple-request-uuid 2e09b472-01c7-510a-b4e6-16eda612a7ee (2026-11-06 18:34:23 GMT) Filed as FB25477648 with a sysdiagnose attached. I've also contacted Developer Support. Happy to share more details.
Topic: Media Technologies SubTopic: Audio Tags:
Replies
Boosts
Views
Activity
2w