If you have not already, we suggest setting your Plex username to something else rather than email which is displayed on your posts in forum. You can change the username at https://app.plex.tv/desktop#!/account
Welcome to our forums! Please take a few moments to read through our Community Guidelines (also conveniently linked in the header at the top of each page). There, you'll find guidelines on conduct, tips on getting the help you may be searching for, and more!

Deep Links

QwertzQwertz Posts: 26Members, Plex Pass Plex Pass

The Plex app for iOS supports deep links, but they aren't documented anywhere. So I did some poking about, and here's what I've learned.

There are three schemes that will prompt iOS to open Plex:

  • plex://
  • plexapp://
  • plexappext://

The plexapp:// scheme deals with app activation only and is not useful to anyone except Plex, so don't use that one. The other two can both be used to perform two actions:

  • preplay: opens a given media item to its info screen
  • play: play the given media item

The plexappext:// scheme does not provide a means of specifying the server on which the media item resides, so it is only really useful from within the app on a server-specific channel or extension.

The plex:// scheme supports specifying the server, so it is useful from outside the app. A properly constructed plex:// link will open the app (even from cold start), connect to servers, find the item, and perform the requested action, provided the app has been opened at least once before (to complete the first-run experience) and has been logged into with an account with access to the given server and media item.

For both of these schemes, specify the action as the host:

  • plex://preplay/
  • plexappext://preplay/

The plexappext:// scheme uses the path to specify the metadata key. So to tell the app to open a media item with metadata key /library/metadata/12345, use:

plexappext://preplay/library/metadata/12345

But such links only work if the app is already connected and has the appropriate server currently selected. For more flexibility, use the plex:// scheme instead.

The plex:// scheme uses querystring parameters to specify:

  • metadataKey
  • metadataType
  • server

So to open /library/metadata/12345, a movie (type = 1) on a server with id ffff1234567890abcdeffedcba0987654321ffff, use:

plex://preplay/?metadataKey=%2Flibrary%2Fmetadata%2F12345&metadataType=1&server=ffff1234567890abcdeffedcba0987654321ffff

To play the media item immediately instead of going to its info screen, use the play action:

plex://play/?metadataKey=%2Flibrary%2Fmetadata%2F12345&metadataType=1&server=ffff1234567890abcdeffedcba0987654321ffff

Media types are documented (unofficially) here.

Use the plex.tv web API to look up server IDs (you need the 40-hex-character machine identifier; the server's friendly name will not work).

Use the PMS REST API to find metadata keys.

Comments

  • QwertzQwertz Posts: 26Members, Plex Pass Plex Pass

    The schemes are slightly different in the beta version of the Plex app:

    • plex:// -> plex.beta://
    • plexapp:// -> plexappbeta://
    • plexappext:// -> plexappext.beta://
Sign In or Register to comment.