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
Name | Description |
---|---|
plex_token | The Plex token. |
user_id | The 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_identifier | The 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 Code | Description |
---|---|
204 | No content - The request was successful. |
400 | Bad request. A mandatory parameter was missing. |
401 | Unauthorized - The Plex token provided was not valid. |
404 | Not 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