Terminate a Transcode Session

This API command can be used to terminate any active transcode session on a Plex server. The playback will stop on the client device with no message.

URL

DELETE http://[IP address]:32400[Session ID]?X-Plex-Token=[PlexToken]

Parameters

NameDescription
IP addressThe IP address of the Plex Media server.
PlexTokenThe authentication Plex token.
Session KeyThe key associated with a session. This key can be found by calling the Active Sessions API command and looking for the key attribute in the TranscodeSession element.

Return Status

HTTP CodeDescription
200Success - The request was successful.
400Bad Request - A parameter was not specified, or was specified incorrectly.
401Unauthorized - The Plex token provided was not valid.
404Not Found - The transcode session does not exist.

Response

No response is returned when a session is terminated. Check for a return status code of 200 to determine if the API call was successful.

Remarks

The key attribute in the Active Sessions API command will be in the format /transcode/session/[Session ID]. This entire key will need to be used in the API request.

Examples

curl -X DELETE http://[IP address]:32400[Session ID]?X-Plex-Token=[PlexToken]
import requests
plex_url = http://[IP address]:32400[Session ID]?X-Plex-Token=[PlexToken]
response = requests.delete(plex_url)
print(response.text)
$response = Invoke-RestMethod 'http://[IP address]:32400[Session ID]?X-Plex-Token=[PlexToken]' -Method 'DELETE'
Write-Output $response
Subscribe
Display