mirror of
https://github.com/LukeHagar/plexjs.git
synced 2025-12-06 04:20:46 +00:00
39 KiB
39 KiB
PostUsersSignInDataUserPlexAccount
Returns the user account data with a valid auth token
Example Usage
import {
PostUsersSignInDataAuthenticationResponseStatus,
PostUsersSignInDataAuthenticationStatus,
PostUsersSignInDataMailingListStatus,
PostUsersSignInDataState,
PostUsersSignInDataStatus,
PostUsersSignInDataUserPlexAccount,
} from "@lukehagar/plexjs/sdk/models/operations";
let value: PostUsersSignInDataUserPlexAccount = {
adsConsent: false,
adsConsentReminderAt: 1556281940,
adsConsentSetAt: 1556281940,
authToken: "CxoUzBTSV5hsxjTpFKaf",
country: "US",
email: "username@email.com",
friendlyName: "friendlyUsername",
entitlements: [
"[]",
],
homeSize: 1,
id: 13692262,
joinedAt: 1556281940,
locale: "sv",
mailingListStatus: PostUsersSignInDataMailingListStatus.Active,
maxHomeSize: 15,
profile: {
defaultAudioLanguage: "ja",
defaultSubtitleLanguage: "en",
},
rememberExpiresAt: 1556281940,
scrobbleTypes: "<value>",
services: [
{
identifier: "metadata-dev",
endpoint: "https://epg.provider.plex.tv",
token: "DjoMtqFAGRL1uVtCyF1dKIorTbShJeqv",
secret: "<value>",
status: PostUsersSignInDataStatus.Online,
},
],
subscription: {
active: true,
subscribedAt: "2021-04-12T18:21:12Z",
status: PostUsersSignInDataAuthenticationStatus.Inactive,
},
subscriptionDescription: "<value>",
subscriptions: [
{
active: true,
subscribedAt: "2021-04-12T18:21:12Z",
status: PostUsersSignInDataAuthenticationResponseStatus.Inactive,
},
],
thumb: "https://plex.tv/users/a4f43c1ebfde43a5/avatar?c=8372075101",
title: "UsernameTitle",
username: "Username",
uuid: "dae343c1f45beb4f",
attributionPartner: null,
pastSubscriptions: [
{
id: "<id>",
mode: "<value>",
renewsAt: 1556281940,
endsAt: 1556281940,
type: "plexpass",
transfer: "<value>",
state: PostUsersSignInDataState.Ended,
billing: {
internalPaymentMethod: {},
paymentMethodId: 785153,
},
},
],
trials: [
{},
],
};
Fields
| Field | Type | Required | Description | Example |
|---|---|---|---|---|
adsConsent |
boolean | ✔️ | Unknown | |
adsConsentReminderAt |
number | ✔️ | N/A | 1556281940 |
adsConsentSetAt |
number | ✔️ | N/A | 1556281940 |
anonymous |
boolean | ➖ | Unknown | |
authToken |
string | ✔️ | The account token | CxoUzBTSV5hsxjTpFKaf |
backupCodesCreated |
boolean | ➖ | If the two-factor authentication backup codes have been created | |
confirmed |
boolean | ➖ | If the account has been confirmed | |
country |
string | ✔️ | The account country | US |
email |
string | ✔️ | The account email address | username@email.com |
emailOnlyAuth |
boolean | ➖ | If login with email only is enabled | |
experimentalFeatures |
boolean | ➖ | If experimental features are enabled | |
friendlyName |
string | ✔️ | Your account full name | friendlyUsername |
entitlements |
string[] | ✔️ | List of devices your allowed to use with this account | |
guest |
boolean | ➖ | If the account is a Plex Home guest user | |
hasPassword |
boolean | ➖ | If the account has a password | |
home |
boolean | ➖ | If the account is a Plex Home user | |
homeAdmin |
boolean | ➖ | If the account is the Plex Home admin | |
homeSize |
number | ✔️ | The number of accounts in the Plex Home | 1 |
id |
number | ✔️ | The Plex account ID | 13692262 |
joinedAt |
number | ✔️ | Unix epoch datetime in seconds | 1556281940 |
locale |
string | ✔️ | The account locale | |
mailingListActive |
boolean | ➖ | If you are subscribed to the Plex newsletter | |
mailingListStatus |
operations.PostUsersSignInDataMailingListStatus | ✔️ | Your current mailing list status (active or unsubscribed) | active |
maxHomeSize |
number | ✔️ | The maximum number of accounts allowed in the Plex Home | 15 |
pin |
string | ➖ | : warning: ** DEPRECATED **: This will be removed in a future release, please migrate away from it as soon as possible. [Might be removed] The hashed Plex Home PIN |
|
profile |
operations.PostUsersSignInDataUserProfile | ✔️ | N/A | |
protected |
boolean | ➖ | If the account has a Plex Home PIN enabled | |
rememberExpiresAt |
number | ✔️ | Unix epoch datetime in seconds | 1556281940 |
restricted |
boolean | ➖ | If the account is a Plex Home managed user | |
roles |
string[] | ➖ | [Might be removed] List of account roles. Plexpass membership listed here | |
scrobbleTypes |
string | ✔️ | Unknown | |
services |
operations.PostUsersSignInDataServices[] | ✔️ | N/A | |
subscription |
operations.PostUsersSignInDataSubscription | ✔️ | If the account’s Plex Pass subscription is active | |
subscriptionDescription |
string | ✔️ | Description of the Plex Pass subscription | |
subscriptions |
operations.PostUsersSignInDataAuthenticationSubscription[] | ➖ | N/A | |
thumb |
string | ✔️ | URL of the account thumbnail | https://plex.tv/users/a4f43c1ebfde43a5/avatar?c=8372075101 |
title |
string | ✔️ | The title of the account (username or friendly name) | UsernameTitle |
twoFactorEnabled |
boolean | ➖ | If two-factor authentication is enabled | |
username |
string | ✔️ | The account username | Username |
uuid |
string | ✔️ | The account UUID | dae343c1f45beb4f |
attributionPartner |
string | ✔️ | N/A | |
pastSubscriptions |
operations.PastSubscription[] | ✔️ | N/A | |
trials |
operations.Trials[] | ✔️ | N/A |