Clients and Resources return empty MediaContainer XML

I have spent a few hours testing an API connection to my new Plex Media Server instance, and have been unable to execute any playback control commands. I am using Postman to send the queries to PMS. It turns out that requests for /clients and /resources both return an empty Media Container like this:

<?xml version="1.0" encoding="UTF-8"?>
<MediaContainer size="0"></MediaContainer>

My server returns valid information for other calls, including /sessions , /library/sections, and /library/recentlyAdded.

In Settings > Plex Web > General, the “Advertise as player” box is checked.

My workstation’s IP is included in the Settings > Network > allowed without auth field. The workstation and server are on the same LAN segment.

Requests from Postman to /clients and /resources also return empty on the machine that PMS is running on, using 127.0.0.1 as the server IP.

Resources are returned from a call on plex.tv though:
https : / / plex . tv/api/resources?X-Plex-Token=<redacted> returns:

<?xml version="1.0" encoding="UTF-8"?>
<MediaContainer size="2">
  <Device name="mycomputer" product="Plex Media Server" productVersion="1.20.1.3252-a78fef9a9" platform="MacOSX" platformVersion="10.15.6" device="Mac" clientIdentifier="<redacted>" createdAt="1599258341" lastSeenAt="1599590106" provides="server" owned="1" accessToken="<redacted>" publicAddress="<redacted>" httpsRequired="0" synced="0" relay="0" dnsRebindingProtection="0" natLoopbackSupported="0" publicAddressMatches="1" presence="1">
    <Connection protocol="http" address="<redacted>" port="32400" uri="http://<redacted>:32400" local="1"/>
  </Device>
  <Device name="Firefox" product="Plex Web" productVersion="4.34.4" platform="Firefox" platformVersion="80.0" device="OSX" clientIdentifier="<redacted>" createdAt="1599258312" lastSeenAt="1599590117" provides="client,player,pubsub-player" owned="1" publicAddress="<redacted>" publicAddressMatches="1" presence="1">
  </Device>
</MediaContainer>

Based on the above information, can anyone suggest what may be preventing me from getting clients and resources information?

Thank you.
Paul

1 Like

You cannot control clients with an API call to the server

Thanks Ottokerner,

A few follow up questions, if you will…

  1. Can the API be used to control clients in any scenario?
  2. Is Plex Companion still the primary guide to setting up any sort of remote control for clients functionality?
  3. If one wanted to script or develop a plugin for remotely controlling playback and media selection on a client, where would one begin?

Thanks!

  1. not to my knowledge
  2. yes
  3. by implementing Plex companion. Which is not publicly documented, so you’ll have to reverse- engineer it, unfortunately.

Thank you again, sir.

Is there a developer program that we could sign up for that will give us the correct documentation to Plex Companion? How do we become a 3rd party developer for Plex functions?

Thank you.

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