Hey there,
Let’s say I have a friend who wants to watch all the movies and series on my server. Usually I’d go to settings → users & sharing → share libraries → enter email → choose libraries → send the email for my friend to accept.
How can I do this via cli (api)? My plex server runs on Ubuntu 20.04.2. I have the api token and I own the server. I tried a bit for myself and noticed that I need to use https://plex.tv/api/v2/shared_servers with ?invitedEmail=XYZ. However I wasn’t able to make it work.
Also, how does plex.tv know everything? I get it when you access the server via [ip-adress]:32400/web. Then it’s obvious that the email that you’re giving together with the server-owners-api-key “suggests” that the person behind the email-adress is invited to THAT server.
But when you use plex.tv, how can you “choose” the server? How can plex.tv know that it needs to add that invited user to a certain server? And also check if the api-token is correct? You get what I mean?
How do you “select” the server and give email and owners-apitoken when a general site (plex.tv) is used?
I tried [ip-adress]:32400/shared_servers?invitedEmail=XYZ&X-Plex-Token=ABC but that didn’t work. However that’s EXACTLY what I want. Email, API-token and done.
 .
 .