mirror of
https://github.com/LukeHagar/plexcsharp.git
synced 2025-12-06 12:37:46 +00:00
Plex
(Plex)
Overview
API Calls that perform operations directly against https://Plex.tv
Available Operations
GetPin
Retrieve a Pin from Plex.tv for authentication flows
Example Usage
using PlexAPI;
using PlexAPI.Models.Components;
using PlexAPI.Models.Requests;
var sdk = new PlexAPISDK();
var res = await sdk.Plex.GetPinAsync(
xPlexClientIdentifier: "<value>",
strong: false);
// handle response
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
XPlexClientIdentifier |
string | ✔️ | The unique identifier for the client application This is used to track the client application and its usage (UUID, serial number, or other number unique per device) |
Strong |
bool | ➖ | Determines the kind of code returned by the API call Strong codes are used for Pin authentication flows Non-Strong codes are used for Plex.tv/link |
serverURL |
string | ➖ | An optional server URL to use. |
Response
GetToken
Retrieve an Access Token from Plex.tv after the Pin has already been authenticated
Example Usage
using PlexAPI;
using PlexAPI.Models.Components;
using PlexAPI.Models.Requests;
var sdk = new PlexAPISDK();
var res = await sdk.Plex.GetTokenAsync(
pinID: "<value>",
xPlexClientIdentifier: "<value>");
// handle response
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
PinID |
string | ✔️ | The PinID to retrieve an access token for |
XPlexClientIdentifier |
string | ✔️ | The unique identifier for the client application This is used to track the client application and its usage (UUID, serial number, or other number unique per device) |
serverURL |
string | ➖ | An optional server URL to use. |