Plex.tv - Get Users

A Plex account can have multiple Plex Home users associated with it. This API request will return a list of all users for the Plex account.

URL

GET https://plex.tv/api/v2/home/users?X-Plex-Client-Identifier={client_identifier}&X-Plex-Token={plex_token}

Parameters

NameDescription
plex_tokenThe Plex token.
client_identifierThe identifier for the client. You can get a client ID by making a request to the Get Devices API and look for an ID in the clientIdentifier attribute.

Return Status

HTTP CodeDescription
200Success - The request was successful.
401Unauthorized - The Plex token provided was not valid.

Response

XML string value that lists the users that have been added to the Plex Home for an account. An example of the XML returned from the request is shown below:

<?xml version="1.0" encoding="UTF-8"?>
<home id="XXXXXX" name="Plexopedia's home" guestUserID="XXXXXXX" guestUserUUID="3e11f81d041ae84f" guestEnabled="0" subscription="1">
    <users>
        <user id="246408570" uuid="7b4af7a9f26254bd" title="Plexopedia" username="Plexopedia" email="[email protected]" friendlyName="" thumb="https://plex.tv/users/7b4af7a9f26254bd/avatar?c=1720981098" hasPassword="1" restricted="0" updatedAt="1704558269" restrictionProfile="" admin="1" guest="0" protected="0"/>
</home>

The XML returned provides a list of all users associated with a Plex account. The root is the home element. This element contains several attributes for the Plex Home.

Home Attributes
AttributeDescription
idThe identifier of the account.
nameThe name of the account.
guestUserIDThe ID of the guest user.
guestUserUUIDThe unique identifier for the guest user.
guestEnabledFlag indicating guest users are enabled.
0 - guest users are not enabled.
1 - guest users are enabled.
subscriptionThe home account has a subscription (Plex Pass).

There is a users child element within the home element but it doesn’t have any attributes.

Within the users element there are one or more user child elements. Each user element represents one user for the Plex Home.

User Attributes
AttributeDescription
idThe ID of the user.
uuidThe unique identifier for the user.
titleThe title of the user.
usernameThe user name associated to the user.
emailThe email associated to the user.
friendlyNameAn easier to read name for the user.
thumbThe thumbnail for the user.
hasPasswordFlag indicating the user has a password.
0 - the user doesn't have a password set.
1 - the user has a password set.
restrictedFlag indicating the user account has restrictions.
0 - the user has no restrictions.
1 - the user has restrictions.
updatedAtThe date and time in epoch time, the user was updated.
restrictionProfileThe restriction profile set to the user.
adminFlag indicating the user account is the server admin.
0 - the user is not the admin.
1 - the user is the admin.
guestFlag indicating the user account is a guest.
0 - the user is not a guest.
1 - the user is a guest.
protectedFlag indicating the user account is protected.
0 - the user is not protected.
1 - the user is protected.

Examples

curl -X GET https://plex.tv/api/v2/home/users?X-Plex-Client-Identifier={client_identifier}&X-Plex-Token={plex_token}
import requests
plex_url = https://plex.tv/api/v2/home/users?X-Plex-Client-Identifier={client_identifier}&X-Plex-Token={plex_token}

response = requests.get(plex_url)

print(response.text)
$response = Invoke-RestMethod 'https://plex.tv/api/v2/home/users?X-Plex-Client-Identifier={client_identifier}&X-Plex-Token={plex_token}' -Method 'GET'

Write-Output $response
Subscribe
Display