Skip to main content
GET
/
activities
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->activities->getServerActivities(

);

if ($response->object !== null) {
    // handle response
}
{
  "MediaContainer": {
    "Activity": [
      {
        "cancellable": true,
        "Context": {},
        "progress": 49.5,
        "Response": {},
        "subtitle": "<string>",
        "title": "<string>",
        "type": "<string>",
        "userID": 123,
        "uuid": "<string>"
      }
    ]
  }
}

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

Response

200 - application/json

OK

MediaContainer
object