How does one obtain a list of their Plex "Friends" e-mail addresses?

I have a lot of Shared Libraries and "Friends" connected to my PMS.  Is there a way to get a list of all my Friends email addresses in PMS without having to go into each friend individually to see it?

Try

https://plex.tv/api/users/

Thanks.  I can see that loads an xml page with lots of informatio. Do you know can I extract all the emails from that page to a text file easily?

I don't know if there is an already 3rd Party plugin to extract that information - but I would just do a select all and copy to a text file in Notepad or Notepad++ and save as text file. 

The way I would extract the information is to open the text file in excel and then use formulas to try and obtain the specific info i want to extract and copy that extracted info (columns) into another text file.

When > @sa2000 said:

Try

https://plex.tv/api/users/

When I go to https://plex.tv/api/users/ is says “Please Sign in” . but i am already signed in… Don’t know what to do :frowning:

I also needed to dump all my plex users email addresses into a contact group for a mass mail. Thanks @sa2000 for getting me on the right track. First you need to obtain your Plex token, or else you will get the “Please Sign In” message. Read this if you don’t have your token already.

Here is the command I used on my linux box to spit out the format I needed for pasting into a contact group. Don’t forget to replace {YOUR-PLEX-TOKEN} with your token. It will output all users to a text file in the (gmail supported) format:

username <user-email@domain.com>,

with a comma at the end of each line except the last.

curl -k --silent "https://plex.tv/api/users/?X-Plex-Token={YOUR-PLEX-TOKEN}" | awk '{for(i=1;i<=NF;i++){if($i~/^username=/){printf $i}}} {for(i=1;i<=NF;i++){if($i~/^email=/){print $i}}}' | sed 's/\"//g' | sed 's/username=//g' | sed 's/email=/ </g' | sed 's/$/>,/' | head -c-2 >> plex-emails.txt

Hope this helps!

5 Likes

Got my Plex Token, inserted it into this command and got this:
head: illegal byte count – -2

It created a blank file. I can browse to the api with the token and see my xml of users though

If anyone was wondering where to find the xml with the X-Token in the url. When you have navigated to an item in your library, click the three dots menu, select “Get Info” scroll down to the bottom, and you will find a link to view XML.

@gurubill command works for me.

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