Plex.tv - Remove a User

This API request will remove a user that is associated with a Plex home account.

URL

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

Parameters

NameDescription
plex_tokenThe Plex token.
user_idThe ID of the user to be deleted. You can get the user ID by making a request to the Get Users API and using the id attribute value.
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
204No content - The request was successful.
400Bad request. A mandatory parameter was missing.
401Unauthorized - The Plex token provided was not valid.
404Not found. The user ID is not valid.

Response

No response is returned. Check the status code to ensure the user was removed successfully.

Examples

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

response = requests.delete(plex_url)

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

Write-Output $response
Subscribe
Display