Get a Single Account

Each Plex server can have multiple accounts created for different users. Information about a single account can be returned using this API command.

URL

GET http://{ip_address}:32400/accounts/{id}?X-Plex-Token={plex_token}

Parameters

NameDescription
ip_addressThe IP address of the Plex Media server.
plex_tokenThe Plex token.
idThe key associated with an account. This key can be found by calling the Accounts API command and looking for the account.

Return Status

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

Response

XML string value that lists the account that has been created on the Plex server. An example of the XML returned from the request is shown below:

<?xml version="1.0" encoding="UTF-8"?>
<MediaContainer size="1" identifier="com.plexapp.system.accounts">
    <Account id="3972737" key="/accounts/3972737" name="Kids" defaultAudioLanguage="en" autoSelectAudio="0" defaultSubtitleLanguage="en" subtitleMode="0" thumb="" />
</MediaContainer>

Remarks

The XML returned provides a list of the libraries that are available on the Plex server. The root is the MediaContainer element. This element contains a few attributes that provide overall information about the account on the server.

MediaContainer Attributes for Plex Accounts
AttributeDescription
sizeThe number of accounts returned.
identifierThe identifier for this type of item in Plex.

Within the MediaContainer is one Account child element. The Account element represents the account on the Plex server.

Plex Account Attributes
AttributeDescription
idAn integer value representing the unique identifier for the account.
keyThe relative URL of the account used to get information about the account.
nameThe name of the account.
defaultAudioLanguageThe default audio language used for the account.
autoSelectAudio1 - automatically select the audio for the account.
0 - do not automatically select the audio for the account.
defaultSubtitleLanguageThe default language for subtitles.
subtitleModeAn integer value representing the subtitle mode. The values are unknown.
thumbThumbnail associated with the account.

Examples

curl -X GET http://{ip_address}:32400/accounts/{id}?X-Plex-Token={plex_token}
import requests
plex_url = http://{ip_address}:32400/accounts/{id}?X-Plex-Token={plex_token}
response = requests.get(plex_url)
print(response.text)
$response = Invoke-RestMethod 'http://{ip_address}:32400/accounts/{id}?X-Plex-Token={plex_token}' -Method 'GET'
Write-Output $response
Subscribe
Display