@ctrl/plex
    Preparing search index...

    Class MyPlexAccount

    MyPlex account and profile information. This object represents the data found Account on the myplex.tv servers at the url https://plex.tv/users/account. You may create this object directly by passing in your username & password (or token). There is also a convenience method provided at PlexServer.myPlexAccount which will create and return this object.

    Index
    • Parameters

      • options: {
            baseUrl?: string | null;
            password?: string;
            server?: PlexServer;
            timeout?: number;
            token?: string;
            username?: string;
            verificationCode?: string;
        } = {}

        Connection + auth options.

        • OptionalbaseUrl?: string | null
        • Optionalpassword?: string
        • Optionalserver?: PlexServer
        • Optionaltimeout?: number
        • Optionaltoken?: string
        • Optionalusername?: string
        • OptionalverificationCode?: string

          Two-factor authentication code for password sign-in.

      Returns MyPlexAccount

    authenticationToken?: string

    auth token for user by plex

    baseUrl: string | null = null
    certificateVersion?: number

    Unknown

    DISCOVER: string = 'https://discover.provider.plex.tv'
    email?: string

    Your current Plex email address

    entitlements?: string[]

    List of devices your allowed to use with this account

    EXISTINGUSER: string = 'https://plex.tv/api/home/users?invitedEmail={username}'
    FRIENDINVITE: string = 'https://plex.tv/api/servers/{machineId}/shared_servers'
    FRIENDSERVERS: string = 'https://plex.tv/api/servers/{machineId}/shared_servers/{serverId}'
    FRIENDUPDATE: string = 'https://plex.tv/api/v2/sharings/{userId}'
    guest?: boolean

    Unknown

    home?: boolean

    Unknown

    homeSize?: number

    Unknown

    HOMEUSER: string = 'https://plex.tv/api/home/users/{userId}'
    HOMEUSERCREATE: string = 'https://plex.tv/api/home/users?title={title}'
    HOMEUSERS: string = 'https://plex.tv/api/home/users'
    id?: number

    Your Plex account ID

    locale?: string | null

    Your Plex locale

    mailingListActive?: boolean
    mailingListStatus?: "active" | "inactive"

    Your current mailing list status.

    MANAGEDHOMEUSER: string = 'https://plex.tv/api/v2/home/users/restricted/{userId}'
    maxHomeSize?: number

    Unknown

    METADATA: string = 'https://metadata.provider.plex.tv'
    password?: string
    PLEXSERVERS: string = 'https://plex.tv/api/v2/servers/{machineId}'
    queueEmail?: string

    Email address to add items to your Watch Later queue.

    REMOVEINVITE: string = 'https://plex.tv/api/invites/requested/{userId}?friend=0&server=1&home=0'
    REQUESTED: string = 'https://plex.tv/api/invites/requested'
    REQUESTS: string = 'https://plex.tv/api/invites/requests'
    restricted?: boolean

    Unknown

    roles: string[]
    scrobbleTypes?: string

    Description

    server?: PlexServer
    SIGNIN: string = 'https://plex.tv/users/sign_in.json'
    subscriptionActive?: boolean | null

    True if your subsctiption is active

    subscriptionFeatures?: string[]

    List of features allowed on your subscription

    subscriptionPlan?: string | null

    Name of subscription plan

    subscriptionStatus?: "active" | "inactive"

    String representation of subscriptionActive

    thumb?: string

    URL of your account thumbnail

    timeout: number = TIMEOUT
    title?: string

    Unknown. - Looks like an alias for username

    token?: string
    username?: string
    uuid?: string

    Unknown

    VIEWSTATESYNC: string = 'https://plex.tv/api/v2/user/view_state_sync'
    WEBHOOKS: string = 'https://plex.tv/api/v2/user/webhooks'
    key: string = 'https://plex.tv/api/v2/user'
    • Returns Record<string, string>

    • Accept a pending invite received by this account.

      Parameters

      Returns Promise<void>

    • Add one webhook while preserving the account's existing URLs.

      Parameters

      • url: string

      Returns Promise<string[]>

    • Cancel a pending invite sent by this account.

      Parameters

      Returns Promise<void>

    • Parameters

      • token: string

        pass token from claimToken

      Returns Promise<unknown>

    • Change the account's playback and library-statistics privacy choices.

      Parameters

      • options: { library?: boolean; playback?: boolean }

      Returns Promise<void>

    • Keep the account token active.

      Returns Promise<boolean>

    • Send an authenticated request to plex.tv or another Plex service. JSON responses are parsed, XML responses are converted to the same shape, and responseType: 'text' returns the body.

      Parameters

      Returns Promise<string>

    • Send an authenticated request to plex.tv or another Plex service. JSON responses are parsed, XML responses are converted to the same shape, and responseType: 'text' returns the body.

      Type Parameters

      • T = unknown

      Parameters

      Returns Promise<T>

    • Remove a user from this account's friends.

      Parameters

      Returns Promise<void>

    • Remove a managed user from this Plex Home.

      Parameters

      Returns Promise<void>

    • Remove a managed Plex Home user's PIN.

      Parameters

      Returns Promise<void>

    • Remove one webhook while preserving the account's remaining URLs.

      Parameters

      • url: string

      Returns Promise<string[]>

    • Replace all webhook URLs configured for this Plex account.

      Parameters

      • urls: readonly string[]

      Returns Promise<string[]>

    • Invalidate this account's authentication token.

      Returns Promise<void>

    • Parameters

      • identifier: { name: string } | { id: string }

      Returns Promise<PlexSonosClient | undefined>

    • Find an account user by title, username, email, or account id.

      Parameters

      • identifier: string | number

      Returns Promise<MyPlexUser>

    • Browse Plex's on-demand video hubs.

      Returns Promise<Hub[]>

    • Return webhook URLs configured for this Plex account.

      Returns Promise<string[]>

    • Create an OAuth PIN and return its Plex authentication URL.

      Parameters

      • forwardUrl: string | null = null

      Returns Promise<WebLogin>

    • Wait for a web login and return the connected Plex account.

      Parameters

      • webLogin: WebLogin
      • __namedParameters: { timeoutSeconds?: number } = {}

      Returns Promise<MyPlexAccount>