Skip to content

Plex unable to add provider using MYPLEX #4892

@Stand1531

Description

@Stand1531

What version of Music Assistant has the issue?

2.8.0b12

How is the MA server installed?

Docker Container

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 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 to resolve this yourself?
  • 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

When trying to create a plex server library provider with MYPLEX it fails with a 401 error.

Seems like it is getting empty back from plex.tv
2026-02-03 23:27:49.713 DEBUG (MainThread) [music_assistant.helpers.auth] Received callback with params: {}

Error in GUI
(401) unauthorized; http://192.168.10.34:32400/ <script>window.location = window.location.href.match(/(^.+/)[^\/]*$/)[1] + 'web/index.html';</script><title>Unauthorized</title>

401 Unauthorized

I've tested manually using plexapi and token with success.

How to reproduce

Create Plex Media Server and auth with MYPLEX

Music Providers

Plex Media Server

Player Providers

Plex Media Server

Full log output

Removed what I thought might be sensitive info. I can provide directly if needed.
musicassistant.log

Additional information

Tested directly with token from user trying to auth with myplex and it worked properly

from plexapi.server import PlexServer
import requests

# connection info
baseurl = 'http://192.168.10.34:32400'
token = '<token>'


session = requests.Session()
session.headers.update({
    "X-Plex-Client-Identifier": "CLI",
    "X-Plex-Product": "Music Assistant CLI Test",
    "X-Plex-Platform": "CLI",
    "X-Plex-Version": "1.0",
})
session.verify = False  # disable cert check for local testing

plex = PlexServer(baseurl, token, session=session)

# list all playlists
playlists = plex.playlists()
print(f"Found {len(playlists)} playlists")

for pl in playlists:
    print(f"Playlist: {pl.title} ({pl.playlistType})")
    # list first 5 items
    for item in pl.items()[:5]:
        print(f" - {item.title} by {getattr(item, 'grandparentTitle', 'Unknown Artist')}")

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

No response

What type of installation are you running?

Home Assistant Container

On what type of hardware are you running?

Alternative

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

  • Yes

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions