PlexPin class

PIN flow state returned by POST /api/v2/pins and GET /api/v2/pins/{id}.

The 4-character code is what the user types at plex.tv/link. Poll PlexAccountApi.pollPin until authToken is non-null, or until expiresAt passes.

Constructors

PlexPin({required int id, required String code, required String clientIdentifier, required DateTime createdAt, required DateTime expiresAt, String? authToken})
Creates a pin state snapshot.
const
PlexPin.fromJson(Map<String, dynamic> json)
Parses the response of POST /api/v2/pins or GET /api/v2/pins/{id}.
factory

Properties

authToken → String?
X-Plex-Token, populated once the user has linked the pin; null until then.
final
clientIdentifier → String
Client identifier the pin was created with (must match on poll).
final
code → String
4-character code the user types at plex.tv/link.
final
createdAt → DateTime
Pin creation timestamp (UTC).
final
expiresAt → DateTime
Pin expiry timestamp (UTC); after this the pin can no longer be completed.
final
hashCode → int
The hash code for this object.
no setterinherited
id → int
Server-assigned pin id used to poll for completion.
final
isAuthenticated → bool
True once the user has approved the pin and an authToken is present.
no setter
isExpired → bool
True when expiresAt is in the past.
no setter
runtimeType → Type
A representation of the runtime type of the object.
no setterinherited

Methods

noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toString() → String
A string representation of this object.
inherited

Operators

operator ==(Object other) → bool
The equality operator.
inherited