Plex Blog

November 12, 2011

myPlex Queue API How-to

Hi Guys! André here, taking a break from working on myPlex to give you an update on how it’s going. Since we launched almost two weeks ago, myPlex has gotten off to a very rousing start. Sophisticated and good-looking Plex users (that’s all of you) have been queueing videos from all over the internet to watch later in one of the many Plex clients.

Enterprising Plex users have even created Chrome and Safari extensions to allow queueing videos directly. Those clever coders have already figured out the HTTP requests to add an item to your myPlex queue. But we want everyone to be able to add to their queues as easily as possible.

So, I thought this would be a good time to explain how those requests work. Armed with this information, you will be able to add “Plex It!” functionality to any program or script that can make HTTP requests. If you’re not the kind of person who “adds functionality to any program or script”, I suggest instead that you bask warmly in the knowledge that there will soon be even more ways to add videos to your myPlex queue.

Anyway, back to adding videos to the queue. Once you have a myPlex account, you only need one thing to queue a video: the URL. As long as you give myPlex the URL of the page with the video on it, we will handle the rest of the work. While not every website with videos works yet, rest assured that we are busily working to expand myPlex to encompass all videos, everywhere.

All requests to myPlex must be made over HTTPS, and must be authenticated. The easiest way to authenticate is to just use HTTP Basic Authentication with your myPlex username and password. Once you have an account and a URL, though, adding a queue item is very easy. How easy, you ask? Let me show you with curl.

$ curl -i -u "username:PASSWORD"  
    --data-urlencode 'url=http://www.youtube.com/watch?v=FCSBoOcGFFE'  
    https://my.plexapp.com/queue/items  
HTTP/1.1 200 OK 

That’s it! Next time you load up Plex on your TV or mobile-handheld-thingy-of-choice, you will be presented with the chance to find out exactly how reality hits you, bro.

That’s all for now, but if you’re writing an application or client that integrates with myPlex, stay tuned! I’ll be writing a followup post explaining how you can connect to a myPlex user’s account without storing their password.

Het beste van Plex

Plex Pass geeft je exclusieve toegang tot fantastische nieuwe opties en apps.

Meer informatie

Het beste van Plex

myPlex Queue API How-to is a premium feature and requires a Plex Pass subscription.

Meer informatie