Hi Plex Team,
I am trying to create an app that gives the feel of channel surfing, but with content from my PMS, and I am trying to properly implement managed user (Home User) support with correct session attribution. I’ve hit a roadblock with the public API and hoping you can point me in the right direction.
What I’m Trying to Accomplish:
-
Allow managed users to select their profile
-
Have their playback sessions appear under their account in the Plex dashboard (not the main account owner)
What I’ve Implemented:
-
Using
/api/v2/home/usersto get list of users
-
Using
/api/home/users/{id}/switchto get user-specific token
-
Using main account token for server access (libraries, media info, streams)

The Problem: When a managed user’s token is used for timeline calls (/:/timeline), the server returns 401 Unauthorized:
POST /api/home/users/{userId}/switch
Response: authToken="{token}"
GET http://192.168.50.124:32400/:/timeline?ratingKey=98682&state=playing&X-Plex-Token={token}
Response: 401 Unauthorized
Using the main account token for timeline calls works (200 OK), but sessions are attributed to the main account owner instead of the managed user.
What I’ve Tried:
-
Using managed user token from /switchAPI - 401 error -
Using main account token with &accountID={userId}parameter - 200 OK but session shows under main account -
Verified the switch response contains only authTokenandauthenticationToken(both identical, no separate server token)
Questions:
-
Is there a way to properly attribute sessions to managed users via the public API?
-
Do managed user tokens from
/switchhave server access permissions, or are they plex.tv-only? -
Is there a different endpoint or parameter I’m missing for multi-user session tracking?
-
If this isn’t supported in the public API, would you consider adding it?
I’ve examined the full XML response from /switch and it looks like there are no additional token fields beyond authToken. The official Plex apps handle this correctly, so I’m hoping there’s an approach I haven’t discovered yet.
Any guidance would be greatly appreciated! Happy to provide additional technical details if helpful.
Thanks!