I’m trying to figure out how to get the remote API playback to work after getting most of the other API stuff to work splendidly, but end up getting a 500 Internal Server Error. The X-Plex-Target-Client-Identifier value is retrieved from my user’s lastPrimaryServerID or machineIdentifier as done in python-plexapi (see here for implementation). Could anyone tell me what I could be doing wrong?
I’m sending the following request:
GET /player/playback/play?type=video&commandID=5 HTTP/1.1
Host: <redacted>.plex.direct:32400
User-Agent: insomnia/5.16.2
Cookie: com.plexapp.system=<redacted>
X-Plex-Token: <redacted>
X-Plex-Target-Client-Identifier: <redacted>
X-Plex-Target-Identifier: <redacted>
X-Plex-Device-Name: <redacted>
Accept: */*
And I’m receiving the following
HTTP/1.1 500 Internal Server Error
Set-Cookie: com.plexapp.system=<redacted>
Content-Length: 726
Content-Type: application/xml
Cache-Control: no-cache
Connection: Keep-Alive
Keep-Alive: timeout=20
X-Plex-Protocol: 1.0
Date: Mon, 21 May 2018 00:36:04 GMT
<?xml version='1.0' encoding='utf-8'?>
<Response code="2000" status="FrameworkException: Unable to find player with identifier <redacted>">
<Traceback>Traceback (most recent call last):
File "/usr/lib/plexmediaserver/Resources/Plug-ins-31d3c0c65/Framework.bundle/Contents/Resources/Versions/2/Python/Framework/components/runtime.py", line 843, in handle_request
result = f(**d)
File "/usr/lib/plexmediaserver/Resources/Plug-ins-31d3c0c65/System.bundle/Contents/Code/playerservice.py", line 50, in process_remote_command
raise FrameworkException('Unable to find player with identifier %s' % identifier)
FrameworkException: Unable to find player with identifier <redacted>
</Traceback>
</Response>