/player/playback/play: 500 Internal Server Error. "X-Plex-Target-Client-Identifier" not found.



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=
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'?>

Powered by Discourse, best viewed with JavaScript enabled