Plex.tv - Get a Claim Token
To add a server to a Plex account it must be claimed. Claiming a server is done by using a claim token to associate the server to an account.
URL
GET https://plex.tv/api/claim/token?&X-Plex-Token={plex_token}
Parameters
Name | Description |
---|---|
plex_token | The Plex token. |
Return Status
HTTP Code | Description |
---|---|
200 | Success - The claim token was generated. |
401 | Unauthorized - The Plex token is not authorized to create a claim token. |
Response
XML string value that contains the claim token. An example of the XML returned from the request is shown below:
<MediaContainer token="claim-XXXXXXXXX_XXXXXXX"/>
Examples
curl -X GET https://plex.tv/api/claim/token?&X-Plex-Token={plex_token}
import requests plex_url = https://plex.tv/api/claim/token?&X-Plex-Token={plex_token} response = requests.get(plex_url) print(response.text)
$response = Invoke-RestMethod 'https://plex.tv/api/claim/token?&X-Plex-Token={plex_token}' -Method 'GET' Write-Output $response