Ghost User: Only Visble via API

Server Version#: 1.20.1.3252
Player Version#: N/A


I have a ghost user. I believe this user started to exist after someone mistakenly added me to their Home a long time ago (I was offering to help test something…didn’t realize they added me as a Home user until it wiped out all my shared stuff!). Anyway, I think one of their Managed Users is still attached to me in some way:

  • If I navigate to https://plex.tv/api/users/?X-Plex-Token=TOKENHERE I can see an account called just “Nathan”
  • Tautulli can also see this mysterious user
  • This mysterious user does not show up in https://app.plex.tv/desktop#!/settings/users-sharing or when accessing this menu via LAN
  • This user does not appear in my com.plexapp.plugins.library.db in any table anywhere either by name or ID
  • They don’t appear in any previous database backups either
  • They have no history at all per my Tautulli logs (and I was only a part of the aforementioned Home for a few minutes)

Here’s the full user info from https://plex.tv/api/users/?X-Plex-Token=TOKENHERE :

<User id="15557155" title="Nathan" thumb="https://plex.tv/users/710d948bb41ca0c4/avatar?c=1554047044" protected="0" home="0" allowTuners="0" allowSync="0" allowCameraUpload="0" allowChannels="0" allowSubtitleAdmin="0" filterAll="" filterMovies="" filterMusic="" filterPhotos="" filterTelevision="" restricted="1"> </User>

I’ve looked through some of these tools/pages without getting any closer to figuring how to delete this user:


Please help me figure out how on Earth to make this ghost user disappear.

Looking into this.

2 Likes

They don’t exist under your Users & Sharing in Settings?

Per my 3rd bullet point, that is correct, @Blacktwin.

So I am the user that tortured xnaas and screwed up. Based on the fact that it is ONLY this user, it must be related to him being a managed user? I have more users and none of them showed up. He was added as a managed user since he is a child. Not sure how that helps him resolve this though.

Wow, how did I miss that…

If you just want to get rid of this user, you can try these solutions:

Make the API call to https://plex.tv/api/home/users/{userId}?X-Plex-Token={YOUR_TOKEN} using DELETE as the command. This can be done using curl or an application like Postman.

Curl:
curl -X "DELETE" https://plex.tv/api/home/users/15557155?X-Plex-Token={YOUR_TOKEN}

Python-API:

from plexapi.myplex import MyPlexAccount
PLEX_TOKEN = 'YOUR_TOKEN'
account = MyPlexAccount(token=PLEX_TOKEN)
account.removeHomeUser('Nathan')

They’re not a Home user, unfortunately:

<?xml version="1.0" encoding="UTF-8"?>
<Response code="404" status="User 15557155 could not be found in your home"/>

See user’s line from XML again:

<User id="15557155" title="Nathan" thumb="https://plex.tv/users/710d948bb41ca0c4/avatar?c=1554047044" protected="0" home="0" allowTuners="0" allowSync="0" allowCameraUpload="0" allowChannels="0" allowSubtitleAdmin="0" filterAll="" filterMovies="" filterMusic="" filterPhotos="" filterTelevision="" restricted="1"> </User>

Particularly:

home=“0”


Edit: I appreciate the suggestion, though! Far more progress than I ever made.

Edit 2: Might I just need to remove /home from the API URL?

Edit 3: Never mind. My Edit 2 was a total flop. Even worse 404 error. :slight_smile:

Just to triple check, that user isn’t at the bottom of the Friends listing in Users & Sharing?

Try these urls:
https://plex.tv/api/friends/15557155?X-Plex-Token={YOUR_TOKEN}
or
https://plex.tv/api/invites/requested/15557155?friend=0&server=1&home=0&X-Plex-Token={YOUR_TOKEN}

friend=0 may need to be flipped to friend=1.

1 Like

Correct. I’ve scrolled through 1000 times. Even tried inspecting page source to see if they showed up anywhere by name or ID. :upside_down_face:

https://plex.tv/api/friends/15557155?X-Plex-Token={YOUR_TOKEN}

I think that was the ticket:

<?xml version="1.0" encoding="UTF-8"?>
<Response code="0" status="Friendship with  removed."/>

Now they don’t show up in https://plex.tv/api/users/?X-Plex-Token={TOKEN} anymore!

Thank you so, so much. :confetti_ball: :partying_face:

You were so close by using the python-plexapi as a reference. Here is the area that uses the url that worked.

code:

    def removeFriend(self, user):
        """ Remove the specified user from all sharing.
            Parameters:
                user (str): MyPlexUser, username, email of the user to be added.
        """
        user = self.user(user)
        url = self.FRIENDUPDATE if user.friend else self.REMOVEINVITE
        url = url.format(userId=user.id)
        return self.query(url, self._session.delete)

FRIENDUPDATE is found at the top, here.

FRIENDUPDATE = 'https://plex.tv/api/friends/{userId}'

I had a similar snafu with joining some else’s home.

1 Like

You actually linked me that thread to help with another issue I had not too long ago related to this same Home mess haha

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