Skip to main content
POST
/
log
PlexPHP
declare(strict_types=1);

require 'vendor/autoload.php';

use LukeHagar\Plex_API;

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

$request = 'level=4&message=Test%20message%201&source=postman\n' .
'level=3&message=Test%20message%202&source=postman\n' .
'level=1&message=Test%20message%203&source=postman';

$response = $sdk->log->logMultiLine(
    request: $request
);

if ($response->statusCode === 200) {
    // handle response
}
This response does not have an example.

Authorizations

X-Plex-Token
string
header
required

The token which identifies the user accessing the PMS. This can be either:

  • A traditional access token obtained from plex.tv
  • A JWT token obtained through the JWT authentication flow

JWT tokens provide better security with:

  • Short-lived tokens (7 days expiration)
  • Public-key cryptography (ED25519)
  • Better clock synchronization
  • Individual device revocation capability

Body

text/plain · file

Line separated list of log items

The body is of type file.

Response

OK

The response is of type file.