GET
/
friends
declare(strict_types=1);

require 'vendor/autoload.php';

use LukeHagar\Plex_API;

$sdk = Plex_API\PlexAPI::builder()
    ->setSecurity(
        '<YOUR_API_KEY_HERE>'
    )
    ->build();



$response = $sdk->plex->getUserFriends(

);

if ($response->friends !== null) {
    // handle response
}
[
  {
    "email": "username@email.com",
    "friendlyName": "exampleUser",
    "home": true,
    "id": 0,
    "restricted": false,
    "sharedServers": [],
    "sharedSources": [],
    "status": "accepted",
    "thumb": "https://plex.tv/users/7d1916e0d8f6e76b/avatar?c=1694481578",
    "title": "username123",
    "username": "username123",
    "uuid": "7d1916e0d8f6e76b"
  }
]

Authorizations

X-Plex-Token
string
header
required

Plex Authentication Token

Response

200
application/json
Friends Data
email
string
required

The account email address

Example:

"username@email.com"

friendlyName
string | null
required

The account full name

Example:

"exampleUser"

home
boolean
required

If the account is a Plex Home user

id
integer
required

The Plex account ID

restricted
boolean
default:false
required

If the account is a Plex Home managed user

sharedServers
object[]
required
sharedSources
object[]
required
status
enum<string>
required

Current friend request status

Available options:
accepted
Example:

"accepted"

thumb
string
required

URL of the account thumbnail

Example:

"https://plex.tv/users/7d1916e0d8f6e76b/avatar?c=1694481578"

title
string
required

The title of the account (username or friendly name)

Example:

"username123"

username
string
required

The account username

Example:

"username123"

uuid
string
required

The account Universally Unique Identifier (UUID)

Example:

"7d1916e0d8f6e76b"