mirror of
https://github.com/LukeHagar/plexcsharp.git
synced 2025-12-07 20:47:44 +00:00
Tv
(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(security: new Models.Components.Security() {
AccessToken = "<YOUR_API_KEY_HERE>",
});
var res = await sdk.Plex.Tv.GetPinAsync(
xPlexClientIdentifier: "string",
strong: false);
// handle response
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
XPlexClientIdentifier |
string | ✔️ | Plex Authentication Token |
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(security: new Models.Components.Security() {
AccessToken = "<YOUR_API_KEY_HERE>",
});
var res = await sdk.Plex.Tv.GetTokenAsync(
pinID: "string",
xPlexClientIdentifier: "string");
// handle response
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
PinID |
string | ✔️ | The PinID to retrieve an access token for |
XPlexClientIdentifier |
string | ✔️ | Plex Authentication Token |
serverURL |
string | ➖ | An optional server URL to use. |