POST
/
pins
using LukeHagar.PlexAPI.SDK;
using LukeHagar.PlexAPI.SDK.Models.Requests;

var sdk = new PlexAPI();

GetPinRequest req = new GetPinRequest() {
    ClientID = "3381b62b-9ab7-4e37-827b-203e9809eb58",
    ClientName = "Plex for Roku",
    DeviceNickname = "Roku 3",
    ClientVersion = "2.4.1",
    Platform = "Roku",
};

var res = await sdk.Plex.GetPinAsync(req);

// handle response
{
  "id": 308667304,
  "code": "7RQZ",
  "product": "0",
  "trusted": false,
  "qr": "https://plex.tv/api/v2/pins/qr/7RQZ",
  "clientIdentifier": "string",
  "location": {
    "code": "VI",
    "continent_code": "NA",
    "country": "United States Virgin Islands",
    "city": "Amsterdam",
    "european_union_member": true,
    "time_zone": "America/St_Thomas",
    "postal_code": 802,
    "in_privacy_restricted_country": true,
    "in_privacy_restricted_region": true,
    "subdivisions": "Saint Thomas",
    "coordinates": "18.3381, -64.8941"
  },
  "expiresIn": 876,
  "createdAt": "2024-07-16T17:03:05Z",
  "expiresAt": "2024-07-16T17:18:05Z",
  "authToken": null,
  "newRegistration": null
}

Headers

X-Plex-Client-Identifier
string
required

An opaque identifier unique to the client (UUID, serial number, or other unique device ID)

X-Plex-Product
string

The name of the client application. (Plex Web, Plex Media Server, etc.)

X-Plex-Device
string

A relatively friendly name for the client device

X-Plex-Version
string

The version of the client application.

X-Plex-Platform
string

The platform of the client application.

Query Parameters

strong
boolean
default:false

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

Response

201
application/json
Requests a new pin id used in the authentication flow

The response is of type object.