myPlex Queue API How-to

11.12.11 20 Comments

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/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.

Share on FacebookTweet about this on TwitterShare on Google+Share on LinkedIn
Share this


  • cool! looking forward to see more ways to add videos to the queue! :-)

  • I tried supplying the direct URL to an m4v video file, but not playable. Should that work?

    • @anville: right now direct links to videos do not work. The reason for this is that we want to collect metadata about the video, so the URL to the page its on is what should be passed. In the future, andre will explain advanced ways of passing direct links to videos along with full metadata to the queue.

  • plex is going to be mainstream and huge, where can i buy some shares? :-)

  • Since myPlex was added, all the previous methods of forcing a library/section update have been removed (AFAIK). Is there a new way to force an update by using curl? ie. I am using sabnzbd and used to have a script update when the download is complete. For me (and possibly many other users) there is no need for pms to recheck the folders continuously or on a set schedule if pms is told when to search for new items.

    • Wolfienuke, those API methods should still exist. If you post logs we can help out more and see what’s going on.

  • can we get plex client for macosx/android working first?

  • Thanks for the info, Elan. For me, the metadata is not such a big deal, as long as I can get to the content. Sort of like when the the PMS scanners find a file, and immediately add it to the library. Just using the base file name is fine.

    Obviously it would be great to give the containing page, and have the video be parsed out, but there are a lot of sites hosting video out there, and don’t want to have to wait for the parser to be written for each one! (For what it’s worth, here’s the page I was trying it out on: )

  • Any plans to allow queuing through email? The TouchPad doesn’t allow any bookmarklets or browser plugins, so email would be great!

    • @Plhnt: as you’ve noticed since posting this comment, absolutely :)

  • Would it be possible to send the url along with a description to override the description you guys gather from the video source? Something like:

    • @Jose: There is an advanced version of the API which allows you to post *all* metadata if you want. However, there’s no way to just override a single field.

  • I think it would be really handy to have a section on the myplex browser page to input a URL which then adds to the queue – would be useful for places where videos are blocked, and you cannot use an extension

    Related: is there an add-on for IE? I am forced to use it at work

  • I can not down load video to my Plex, my Plex it button has gone, I cannot drag another one to my favorites bar

  • @elan: Please, can you get me a way to find some documentation about that you call “advanced version of the API which allows you to post *all* metadata”?

    Please, I’m waiting than more an year for that! :]
    If there is not any documentation about, can you indicate me where I can find some piece of code of the api to understand how it works, what params it’s looking for, etc?

    Thank you!!

    • @Francesco: Watch the Plex Media Server.log and edit metadata in Plex/Web :)

  • Something I just noticed with the chrome plug-in. It does not seem to store your account information. If you have not logged into myPlex during the session then it will just look like the button isn’t working.

    Work around: Log into myPlex first thing when you open chrome. Should work after that connection is complete.

  • Can’t wait until this hits the mainstream! A little too tech for me, but really cool feature.

  • how can i show my pics (not videos) from my mac to my samsung smart tv?

Leave a Reply

Your email address will not be published. Required fields are marked *

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <s> <strike> <strong>