Skip to content

Apple Music cannot be authenticated in Japan #4380

Description

@taikun114

What version of Music Assistant has the issue?

2.6.1

How is the MA server installed?

Home Assistant OS Addon

Carefully read the Troubleshooting FAQ and confirm that

  • I have examined the logs and tried to resolve this issue
  • I have fixed any errors in the logs that relate to tags
  • I am not running MA across a VPN, VLAN, subnet, behind a firewall, or using local SSL or have any other complex network setup
  • I have disabled tool such as AdGuard, Pi-hole or pfSense and retested
  • I have checked my network setup to ensure mDNS/multicast is not being blocked
  • If using HA, I have confirmed the internal URL is set correctly
  • I have tried a wired connection for issues related to interrupted or poor playback quality
  • If the problem relates to a device then I have checked the device settings
  • If it is a frontend issue, I have tried a different widely used browser
  • I have reviewed the applicable player or music provider documentation
  • For voice problems, I have sought help elsewhere before returning here
  • For playback problems, I have recycled power to the physical device
  • I have tried restarting MA and rebooting the host

Have you reviewed the Open and Closed Issues and Discussions to resolve this yourself?

  • Yes

The problem

After the issue with the Apple Music authentication button not responding (#4328) was resolved, I've been trying to authenticate Apple Music, but when I click the provider's save button, I get a Bad Request error and cannot save.
I live in Japan, and I thought the ?l=jp parameter in the URL might be the issue, but I don't know how to remove this parameter or change the URL.

Image

How to reproduce

  1. Open the Apple Music provider setup screen
  2. Click “AUTHENTICATE WITH APPLE MUSIC”
  3. Complete authentication on the displayed authentication page
  4. The Music User Token will be entered automatically, so click “SAVE”
  5. The error 400, message=‘Bad Request’, url=‘https://api.music.apple.com/v1/me/storefront?l=jp’ is displayed

If Apple Music was previously added and an authentication error appears, open the provider's edit screen, delete the entered Music user token, click AUTHENTICATE WITH APPLE MUSIC, and proceed to step 3 or later.

Music Providers

Providers experiencing issues

  • Apple Music

Providers not experiencing issues

  • Filesystem (local disk)
  • Music Assistant
  • Soundcloud
  • Spotify

Player Providers

I am unable to test the player because I cannot add a provider. Music from other providers can be played without issues on all of the following players.

Registered providers

  • AirPlay
  • Chromecast
  • Music Assistant
  • Playergroup
  • Snapcast

Full log output

The player name contained personal information, so only that portion (MacBook Air player name only) has been masked with ***. Everything else remains unchanged.

music-assistant.log

Additional information

I tried registering the music provider both through the add-on Ingress and via direct access (by entering the IP address and port), but the result was the same. I also tried both Brave and Safari browsers, but the result was the same.

When I authenticated the Apple Music provider using the documented steps several months before the authentication button was added to Music Assistant, it worked without issues.

Considering the possibility that my environment was the issue, I set up Music Assistant as a Docker container on a different computer not running Home Assistant and the first-time setup of the Apple Music provider authenticated without problems. However, playlists and songs did not appear so I tried to re-authenticate, but encountered the same error 400, message=‘Bad Request’, url=‘https://api.music.apple.com/v1/me/storefront?l=jp’ was displayed, and just like the add-on, I could no longer configure or re-authenticate at all.
I tried removing and re-adding the music provider, but I kept getting the same error and even after restarting the container, I couldn't get it to authenticate.
Therefore, I believe this is an issue on the Music Assistant side (or Apple's server side), not a problem with the host system.

Of course, I cleared the cache from the Music Assistant’s cache controller.

Whether I continue without signing out or sign out and sign in again on the Apple account authentication screen, the result remains the same.

Image

What version of Home Assistant Core (if used) are your running

2025.10.4

What type of installation are you running?

Home Assistant OS

On what type of hardware are you running?

Generic x86-64 (e.g. Intel NUC)

Have you included ALL of the information specified in the Troubleshooting FAQ or explained why you cannot

  • Yes

Metadata

Metadata

Labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions