Plex.tv - Get a User

This API request will return information about a single user that is associated with a Plex token.

URL

GET https://plex.tv/api/v2/home/user?X-Plex-Token={plex_token}

Parameters

NameDescription
plex_tokenThe Plex user token.

Return Status

HTTP CodeDescription
200Success - The request was successful.
400Bad request. A mandatory parameter was missing.
401Unauthorized - The Plex token provided was not valid.

Response

XML string value that shows information for a single user. An example of the XML returned from the request is shown below:

<?xml version="1.0" encoding="UTF-8"?>
<user id="246408570" uuid="7b4af7a9f26254bd" username="Plexopedia" title="Plexopedia" email="[email protected]" friendlyName="" locale="" confirmed="1" joinedAt="1419625151" emailOnlyAuth="1" hasPassword="1" protected="0" thumb="https://plex.tv/users/7b4af7a9f26254bd/avatar?c=1720981098" authToken="XXXXXXXXXXXXX" mailingListStatus="active" mailingListActive="1" scrobbleTypes="" country="CA" subscriptionDescription="Lifetime Plex Pass" restricted="0" anonymous="0" home="1" guest="0" homeSize="3" homeAdmin="1" maxHomeSize="15" rememberExpiresAt="1722263735" adsConsent="" adsConsentSetAt="" adsConsentReminderAt="" experimentalFeatures="0" twoFactorEnabled="1" backupCodesCreated="1">
    <subscription active="1" subscribedAt="2015-01-04 06:27:34 UTC" status="Active" paymentService="braintree" plan="lifetime">
        <features>
            <feature id="guided-upgrade"/>
            <feature id="increase-password-complexity"/>
            <feature id="upgrade-3ds2"/>
            <feature id="ad-countdown-timer"/>
            <feature id="adaptive_bitrate"/>
            <feature id="amazon-loop-debug"/>
    ...
    </subscription>
    ...
</user>

The XML returned provides a information about the user. The root is the user element.

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.
localeThe locale of the user.
confirmedFlag indicating the user has confirmed their account.
0 - the account has not been confirmed.
1 - the account has been confirmed.
joinedAtThe date and time in epoch time, the user created the account.
emailOnlyAuthAuthentication only done through email.
hasPasswordFlag indicating the user has a password.
0 - the user doesn't have a password set.
1 - the user has a password set.
protectedFlag indicating the user account is protected.
0 - the user is not protected.
1 - the user is protected.
thumbThe thumbnail for the user.
authTokenThe Plex authentication token for the user.
mailingListStatusThe status of the current mail list subscription.
mailingListActiveFlag indicating if the user is currently actively subscribed to the Plex mailing list.
0 - not currently active.
1- currently active.
scrobbleTypesUnknown.
countryCountry for the user.
subscriptionDescriptionA description of the user's Plex subscription.
restrictedFlag indicating the user account has restrictions.
0 - the user has no restrictions.
1 - the user has restrictions.
anonymousFlag indicating the user is anonymous.
0 - the user is not anonymous.
1 - the user is anonymous.
homeFlag indicating that Plex Home is enabled.
0 - Plex Home is not enabled.
1 - Plex Home is enabled.
guestFlag indicating the user account is a guest.
0 - the user is not a guest.
1 - the user is a guest.
homeSizeThe number of users in Plex Home.
homeAdminFlag indicating the user is the Plex Home admin.
0 - the user is not the admin.
1 - the user is a Plex Home admin.
maxHomeSizeThe maximum number of users allowed in Plex Home.
rememberExpiresAtThe date and time in epoch time, the user's remembers login expires.
adsConsentFlag indicating the ads consent.
adsConsentSetAtThe date and time in epoch time, when the ads consent was set.
adsConsentReminderAtThe date and time in epoch time, when the ads consent reminder will be shown.
experimentalFeaturesFlag indicating the that experimental features are enabled.
0 - experimental features are not enabled.
1 - experimental features are enabled.
twoFactorEnabledFlag indicating the that two factor authentication is enabled.
0 - two factor authentication is not enabled.
1 - two factor authentication is enabled.
backupCodesCreatedFlag indicating backup codes have been generated.
0 - backup codes have not been generated.
1 - backup codes have been generated.

Within the user element there is a subscription element that contains information about the Plex subscription associated to the user.

Subscription Attributes
AttributeDescription
activeFlag indicating the subscription is active.
subscribedAtThe date and time in epoch time, when the subscription started.
statusCurrent status of the subscription.
paymentServiceService used for payment.
planThe subscription plan type.

Examples

curl -X GET https://plex.tv/api/v2/home/user?X-Plex-Token={plex_token}
import requests
plex_url = https://plex.tv/api/v2/home/user?X-Plex-Token={plex_token}

response = requests.get(plex_url)

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

Write-Output $response
Subscribe
Display