What’s the right way to connect a client?

Hi Ninjas,

 

I’m in the mist of retooling my little popcornhour plex client (plexNMT) and would like to know the correct steps in connecting a client to the PMS.

 

I see playing with the iOS client and watching the logs that it sends 

X-Plex-Version =>
X-Plex-Device =>
X-Plex-Token =>
X-Plex-Client-Platform =>
X-Plex-Device-Name =>
X-Plex-Device-Model =>
X-Plex-Platform =>
X-Plex-Product =>
X-Plex-Client-Identifier =>
X-Plex-Platform-Version =>
X-Plex-Client-Capabilities =>

 

with most request to the server

 

 

should we be sending this each time or can we register our client information and capabilities once and then use something like the UDID to identify it to the server on following request

.

Also a few other questions

 

What’s the X-Plex-Token and how do I use it?

 

Is there a list of supported protocols for the X-Plex-Client-Capabilities?

 

Is there any progress on the HTTP API documentation?

One of the better resources is the Roku Client, it is open source.

https://github.com/plexinc/roku-client-public

As for REST API documentation, that hasn't been documented publicly that well.  I have created a Java library that provides the basics for accessing and navigating the library at least for Movies and TV shows, as well as setting Watched, Unwatched, and updating Progress.   That can be seen as part of the Serenity for Google TV project.

https://github.com/NineWorlds/serenity-android/tree/master/plexapp-rest-library

As for accessing the server, it depends on what you are wanting to do.  None of those X-* headers are actually necessary, some may be necessary if you want your client to work with myPlex and support Transcoding.

As for the registration, I stumbled across the following thread...

http://forums.plexapp.com/index.php/topic/56934-register-client-as-plex-player/

I got the "Hello"/"Bye" running on my side, but the thread's question ("How to maintain the connection?") is still open.

Thanks for the replies,

Unfortunately my client is written in flash lite + as2 and I can’t seam to find a way to send broadcast http messages like m-search, hello, bye. But then again I’m new to that stuff and could be missing something.


I just thought with all the good work that the Plex guy and girls have done with the API they would have put in a client/player resignation end point.


My client works ok for now without telling the pms anything, by just getting the info for what I need from the http API. but I did read somewhere that they would like us to use as many X- headers as we can so they can get picture of what and how plex is been used.

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.