# /clients endpoint not reporting correctly

**URL:** <https://forums.plex.tv/t/clients-endpoint-not-reporting-correctly/777636>\
**Category:** Plex Media Server\
**Tags:** server-linux\
**Created:** [February 21, 2022, 10:42pm UTC](https://forums.plex.tv/t/clients-endpoint-not-reporting-correctly/777636 "2022-02-21T22:42:52Z")\
**Posts on this page:** 15\
**Page:** 1

<div class="post-metadata">

**Author:** ![Casvt](https://avatars.discourse-cdn.com/v4/letter/c/839c29/32.png) [@Casvt](https://forums.plex.tv/u/Casvt)\
**Post date:** [February 21, 2022, 10:42pm UTC](https://forums.plex.tv/t/clients-endpoint-not-reporting-correctly/777636/1 "2022-02-21T22:42:52Z")

</div>

Server Version#: 1.25.5.5492

Hey there,

I was making a script for someone that changes the audio/subtitle stream of a stream when needed. This ofcourse requires the script to control the client. Everything in the script is working fine except one thing: python-plexapi, which is the package that I use to control the clients, can’t find the client.

When I start a stream on my phone, and I execute `plex.clients()`, I should see my phone in the returned list. However, the list is completly empty aside from plex web app clients. Looking at the source code, ppa just makes a request to the `/clients` endpoint. So I did that instead and indeed only saw one plex web app instance that I had open on my computer but not my phone that was streaming media at that moment.

This problem makes my script useless because I can’t control the client without the needed info and that info can only be found at the `/clients` endpoint but the client isn’t there. So I can’t control the client.

For example [here](https://python-plexapi.readthedocs.io/en/latest/introduction.html) example 4 shows example usage given directly by ppa that doesn’t work. The strange thing is that it worked a few weeks ago. I’ve personally seen the script work but now suddenly ppa can’t find the clients anymore because plex doesn’t show them in the endpoint. Maybe this is a bug in a new update? Or has this info moved to a different endpoint? Whatever is going on, a few weeks ago this worked fine and now it doesn’t and I didn’t do anything different in those weeks.

Both the person I’m making the script for and I have tried clients but nothing works. A tv, 2 different phones, a chromecast. Nothing is returned in the `/clients` endpoint aside from plex web app instances.

I’m surprised no one has made a post about this before because not a single script that controls clients, of which there are thousands of on github, would work.

I hope a sollution can be found!

---

<div class="post-metadata">

**Author:** ![dane22](https://sea1.discourse-cdn.com/plex/user_avatar/forums.plex.tv/dane22/32/4389_2.png) [@dane22](https://forums.plex.tv/u/dane22)\
**Post date:** [February 21, 2022, 10:53pm UTC](https://forums.plex.tv/t/clients-endpoint-not-reporting-correctly/777636/2 "2022-02-21T22:53:07Z")

</div>

Since `python-plexapi` is a 3rd. Party thing, you might get a better/faster respond by joining their [Discord](https://discord.gg/GtAnnZAkuw) for support and discussion, as mentioned [here](https://python-plexapi.readthedocs.io/en/latest/introduction.html)

---

<div class="post-metadata">

**Author:** ![Casvt](https://avatars.discourse-cdn.com/v4/letter/c/839c29/32.png) [@Casvt](https://forums.plex.tv/u/Casvt)\
**Post date:** [February 21, 2022, 11:00pm UTC](https://forums.plex.tv/t/clients-endpoint-not-reporting-correctly/777636/4 "2022-02-21T23:00:59Z")

</div>

The thing is that in order for ppa to control the client, it needs info about it which it searches at the `/clients` endpoint. This is completely normal and how it should be done. However, `/clients` is just not showing the client. ppa is doing nothing wrong. Plex is not returning clients that it should be. If plex correctly returned the clients, ppa would do it’s thing perfectly fine.

In fact ppa is working so fine that it is even doing it now with the errors. I’m requesting ppa to control a client with a certain name so it searches it but plex says that there is no such client connected so ppa returns 404. Even with the errors, ppa is doing the correct thing. Plex should just correctly return the clients.

---

<div class="post-metadata">

**Author:** ![dane22](https://sea1.discourse-cdn.com/plex/user_avatar/forums.plex.tv/dane22/32/4389_2.png) [@dane22](https://forums.plex.tv/u/dane22)\
**Post date:** [February 21, 2022, 11:19pm UTC](https://forums.plex.tv/t/clients-endpoint-not-reporting-correctly/777636/5 "2022-02-21T23:19:01Z")

</div>

Stay tuned.

Not knowing the endpoint details, but does looks strange.

Will dig into it

---

<div class="post-metadata">

**Author:** ![Casvt](https://avatars.discourse-cdn.com/v4/letter/c/839c29/32.png) [@Casvt](https://forums.plex.tv/u/Casvt)\
**Post date:** [February 22, 2022, 12:00am UTC](https://forums.plex.tv/t/clients-endpoint-not-reporting-correctly/777636/6 "2022-02-22T00:00:09Z")

</div>

Thanks for looking into it.

I’ll patiently wait.

---

<div class="post-metadata">

**Author:** ![dane22](https://sea1.discourse-cdn.com/plex/user_avatar/forums.plex.tv/dane22/32/4389_2.png) [@dane22](https://forums.plex.tv/u/dane22)\
**Post date:** [February 23, 2022, 10:15pm UTC](https://forums.plex.tv/t/clients-endpoint-not-reporting-correctly/777636/7 "2022-02-23T22:15:36Z")

</div>

In PMS, under settings/network, have you enabled GDM discovery?

Edit: And if not, do so and restart PMS

---

<div class="post-metadata">

**Author:** ![Casvt](https://avatars.discourse-cdn.com/v4/letter/c/839c29/32.png) [@Casvt](https://forums.plex.tv/u/Casvt)\
**Post date:** [February 27, 2022, 9:14am UTC](https://forums.plex.tv/t/clients-endpoint-not-reporting-correctly/777636/8 "2022-02-27T09:14:36Z")

</div>

Yes I have it enabled.

---

<div class="post-metadata">

**Author:** ![dane22](https://sea1.discourse-cdn.com/plex/user_avatar/forums.plex.tv/dane22/32/4389_2.png) [@dane22](https://forums.plex.tv/u/dane22)\
**Post date:** [February 27, 2022, 11:45am UTC](https://forums.plex.tv/t/clients-endpoint-not-reporting-correctly/777636/9 "2022-02-27T11:45:09Z")

</div>

And local firewall is open for GDM port?

Ref: [What network ports do I need to allow through my firewall? | Plex Support](https://support.plex.tv/articles/201543147-what-network-ports-do-i-need-to-allow-through-my-firewall/)

---

<div class="post-metadata">

**Author:** ![Volts](https://avatars.discourse-cdn.com/v4/letter/v/a5b964/32.png) [@Volts](https://forums.plex.tv/u/Volts)\
**Post date:** [February 28, 2022, 8:24pm UTC](https://forums.plex.tv/t/clients-endpoint-not-reporting-correctly/777636/12 "2022-02-28T20:24:46Z")

</div>

Is `Advertise as player ` enabled on the client?

---

<div class="post-metadata">

**Author:** ![Casvt](https://avatars.discourse-cdn.com/v4/letter/c/839c29/32.png) [@Casvt](https://forums.plex.tv/u/Casvt)\
**Post date:** [February 28, 2022, 8:30pm UTC](https://forums.plex.tv/t/clients-endpoint-not-reporting-correctly/777636/13 "2022-02-28T20:30:04Z")

</div>

Yes but I’m going to try the firewall thing in an hour. I think that is the problem.

---

<div class="post-metadata">

**Author:** ![Casvt](https://avatars.discourse-cdn.com/v4/letter/c/839c29/32.png) [@Casvt](https://forums.plex.tv/u/Casvt)\
**Post date:** [March 2, 2022, 8:11pm UTC](https://forums.plex.tv/t/clients-endpoint-not-reporting-correctly/777636/14 "2022-03-02T20:11:04Z")

</div>

Thanks it worked

---

<div class="post-metadata">

**Author:** ![spdelope](https://avatars.discourse-cdn.com/v4/letter/s/b4bc9f/32.png) [@spdelope](https://forums.plex.tv/u/spdelope)\
**Post date:** [March 3, 2022, 8:02pm UTC](https://forums.plex.tv/t/clients-endpoint-not-reporting-correctly/777636/15 "2022-03-03T20:02:28Z")

</div>

I don’t understand why or how I would open a port on my LAN. I use pfsense and it doesnt block anything LAN\>LAN.

---

<div class="post-metadata">

**Author:** ![dane22](https://sea1.discourse-cdn.com/plex/user_avatar/forums.plex.tv/dane22/32/4389_2.png) [@dane22](https://forums.plex.tv/u/dane22)\
**Post date:** [March 3, 2022, 8:15pm UTC](https://forums.plex.tv/t/clients-endpoint-not-reporting-correctly/777636/16 "2022-03-03T20:15:23Z")

</div>

> [@spdelope](#):
>
> I would open a port on my LAN

I was talking about local FW on Windows etc.

---

<div class="post-metadata">

**Author:** ![spdelope](https://avatars.discourse-cdn.com/v4/letter/s/b4bc9f/32.png) [@spdelope](https://forums.plex.tv/u/spdelope)\
**Post date:** [March 8, 2022, 12:01am UTC](https://forums.plex.tv/t/clients-endpoint-not-reporting-correctly/777636/17 "2022-03-08T00:01:04Z")

</div>

Makes sense! Thx

---

<div class="post-metadata">

**Author:** ![system](https://global.discourse-cdn.com/plex/original/3X/2/a/2acb9765406f63293d357b4ec509ec39aa28f2ad.png) [@system](https://forums.plex.tv/u/system)\
**Post date:** [June 6, 2022, 12:01am UTC](https://forums.plex.tv/t/clients-endpoint-not-reporting-correctly/777636/18 "2022-06-06T00:01:27Z")

</div>

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