Get Transient Token

This API command will get a temporary token that has the same access level as the caller's token. The token returned by this request will be valid for 48 hours and are destroyed if the Plex server is restarted.

URL

GET http://{ip_address}:32400/security/token?X-Plex-Token={plex_token}

Parameters

NameDescription
ip_addressThe IP address of the Plex Media server.
plex_tokenThe Plex token.

Return Status

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

Response

XML string that contains the temporary token. An example of the XML that is returned is shown below:

<?xml version="1.0" encoding="UTF-8"?>
<MediaContainer size="0" token="transient-24b68e46-3eb5-449e-8295-ff59e9a5e6cb"></MediaContainer>

The XML returned is very simple and includes two attributes, with one of the attributes being the transient token.

MediaContainer Attributes
AttributeDescription
sizeNot used. Will be 0.
tokenThe token.

Remarks

As mentioned above, the token is temporary. It will be valid for 48 hours and is invalid once the Plex server is restarted.

The transient token will have the same access level as the Plex token used to make the request. For example, if the server token is used to make the request, then the transient token will have server-level access.

Transient tokens have the 'transient' prefix.

Examples

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