Skip to content

Spotify playlists return 403 Forbidden — /playlists/{id}/tracks endpoint removed Feb 2026 #5114

Description

@Yipsh

What version of Music Assistant has the issue?

2.7.11

How is the MA server installed?

Home Assistant OS Addon

Mandatory: Carefully read the Troubleshooting FAQ and confirm that

  • I have examined the logs and tried to resolve this issue
  • I have fixed any errors or warnings 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 am not using or have disabled tools such as AdGuard, Pi-hole or pfSense and retested
  • I have checked my network setup to ensure mDNS/multicast is not being blocked
  • I have reviewed the Open and Closed Issues and Discussions
  • I have reviewed the applicable player or music provider documentation
  • I have reviewed the MA Status Page
  • I have tried restarting MA and rebooting the host

As Applicable: Carefully read the Troubleshooting FAQ and confirm that

  • 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
  • For voice problems, I have sought help elsewhere before returning here
  • For playback problems, I have recycled power to the physical device

The problem

Spotify playlist playback returns 403 Forbidden. Individual tracks play fine.

Error from logs:

ERROR (MainThread) [music_assistant.webserver] Error handling message: player_queues/play_media: 403, message='Forbidden', url='https://api.spotify.com/v1/playlists/{id}/tracks?limit=1&offset=0&market=from_token&country=from_token'

Root cause

Spotify's February 2026 API changes removed GET /playlists/{id}/tracks and replaced it with GET /playlists/{id}/items.

The current stable Spotify provider (provider.py line 591) still uses the old endpoint:

uri = "me/tracks" if is_liked_songs else f"playlists/{prov_playlist_id}/tracks"

Additional methods that need updating:

  • Line 685: add_playlist_tracksPOST /playlists/{id}/tracks
  • Line 693/700: remove_playlist_tracksDELETE /playlists/{id}/tracks

Note: Per Spotify's new policy, playlist contents (items) are only returned for the authenticated user's own playlists. Other users' playlists will only return metadata.

How to reproduce

  1. Add Spotify as a music provider
  2. Try to play any playlist

Music Providers

Spotify

Player Providers

AirPlay, DLNA

Full log output

2026-03-19 14:49:36.831 ERROR (MainThread) [music_assistant.webserver] Error handling message: player_queues/play_media: 403, message='Forbidden', url='https://api.spotify.com/v1/playlists/0UgQJRcBfVlMruYbNBaGrd/tracks?limit=1&offset=0&market=from_token&country=from_token'
2026-03-19 14:49:43.828 ERROR (MainThread) [music_assistant.webserver] Error handling message: player_queues/play_media: 403, message='Forbidden', url='https://api.spotify.com/v1/playlists/4zS9mCBwgDyUeAWEUE0r0n/tracks?limit=1&offset=0&market=from_token&country=from_token'

Additional information

Related to #4978. Both stable and dev branches are affected. The fix is straightforward — replace /tracks with /items in the playlist endpoint calls.

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

2026.3.2

What type of installation are you running?

Home Assistant OS

On what type of hardware are you running?

Generic x86-64

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

  • Yes

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions