Files
plexjs/docs/models/operations/userplexaccount.md

39 KiB
Raw Blame History

UserPlexAccount

Returns the user account data with a valid auth token

Example Usage

import {
  MailingListStatus,
  ServiceStatus,
  SubscriptionStatus1,
  SubscriptionStatus2,
  UserPlexAccount,
} from "@lukehagar/plexjs/models/operations";
import {
  AutoSelectSubtitle,
  DefaultSubtitleAccessibility,
  DefaultSubtitleForced,
  MediaReviewsVisibility,
  WatchedIndicator,
} from "@lukehagar/plexjs/models/shared";

let value: UserPlexAccount = {
  adsConsentReminderAt: 1556281940,
  adsConsentSetAt: 1556281940,
  authToken: "CxoUzBTSV5hsxjTpFKaf",
  country: "US",
  email: "username@email.com",
  friendlyName: "friendlyUsername",
  entitlements: [],
  homeSize: 1,
  id: 13692262,
  joinedAt: 1556281940,
  mailingListStatus: MailingListStatus.Active,
  maxHomeSize: 15,
  profile: {
    defaultAudioLanguage: "ja",
    defaultAudioLanguages: null,
    defaultSubtitleLanguage: "en",
    defaultSubtitleLanguages: null,
    autoSelectSubtitle: AutoSelectSubtitle.ShownWithForeignAudio,
    defaultSubtitleAccessibility: DefaultSubtitleAccessibility.PreferSdh,
    defaultSubtitleForced: DefaultSubtitleForced.PreferForced,
    watchedIndicator: WatchedIndicator.MoviesAndTvShows,
    mediaReviewsVisibility: MediaReviewsVisibility.CriticsOnly,
    mediaReviewsLanguages: null,
  },
  rememberExpiresAt: 1556281940,
  services: [
    {
      identifier: "metadata-dev",
      endpoint: "https://epg.provider.plex.tv",
      token: "DjoMtqFAGRL1uVtCyF1dKIorTbShJeqv",
      secret: "<value>",
      status: ServiceStatus.Online,
    },
  ],
  subscription: {
    active: true,
    subscribedAt: "2021-04-12T18:21:12Z",
    status: SubscriptionStatus1.Inactive,
  },
  subscriptions: [
    {
      active: true,
      subscribedAt: "2021-04-12T18:21:12Z",
      status: SubscriptionStatus2.Inactive,
    },
  ],
  thumb: "https://plex.tv/users/a4f43c1ebfde43a5/avatar?c=8372075101",
  title: "UsernameTitle",
  username: "Username",
  uuid: "dae343c1f45beb4f",
  attributionPartner: null,
  pastSubscriptions: [],
  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.MailingListStatus Your current mailing list status 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 shared.UserProfile 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.Service[] N/A
subscription operations.Subscription1 If the account's Plex Pass subscription is active
subscriptionDescription string Description of the Plex Pass subscription
subscriptions operations.Subscription2[] 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.Trial[] ✔️ N/A