Skip to main content
GET
/
security
/
resources
PlexPHP
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->authentication->getSourceConnectionInformation(
    source: 'server://client-identifier'
);

if ($response->statusCode === 200) {
    // handle response
}
{
  "MediaContainer": {
    "identifier": "<string>",
    "offset": 123,
    "size": 123,
    "totalSize": 123,
    "Device": {
      "accessToken": "<string>",
      "clientIdentifier": "<string>",
      "Connection": [
        {
          "address": "<string>",
          "local": true,
          "port": 123,
          "protocol": "<string>",
          "relay": true,
          "uri": "<string>"
        }
      ],
      "name": "<string>"
    }
  }
}

Authorizations

X-Plex-Token
string
header
required

Headers

accepts
enum<string>
default:application/xml
Available options:
application/json,
application/xml
X-Plex-Client-Identifier
string
required
Example:
X-Plex-Product
string
Example:
X-Plex-Version
string
Example:
X-Plex-Platform
string
Example:
X-Plex-Platform-Version
string
Example:
X-Plex-Device
string
Example:
X-Plex-Model
string
Example:
X-Plex-Device-Vendor
string
Example:
X-Plex-Device-Name
string
Example:
X-Plex-Marketplace
string
Example:

Query Parameters

source
string
required
refresh
enum<integer>
Available options:
0,
1

Response

MediaContainer
object