@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 :class:~plexapi.server.PlexServer.myPlexAccount() which will create and return this object.

    Index
    • Parameters

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

        Connection + auth options.

      Returns MyPlexAccount

    authenticationToken?: string

    auth token for user by plex

    baseUrl: string = 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

    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/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

    scrobbleTypes?: string

    Description

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

    True if your subsctiption is active

    subscriptionFeatures?: string[]

    List of features allowed on your subscription

    subscriptionPlan?: string

    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

    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>

    • Returns a new :class:~server.PlexServer or :class:~client.PlexClient object. Often times there is more than one address specified for a server or client. This function will prioritize local connections before remote and HTTPS before HTTP. After trying to connect to all available addresses for this resource and assuming at least one connection was successful, the PlexServer object is built and returned.

      Returns Promise<MyPlexAccount>

    • Parameters

      • name: string = ''

        Name to match against.

      • OptionalclientId: string

        clientIdentifier to match against.

      Returns Promise<MyPlexDevice>

    • Main method used to handle HTTPS requests to the Plex client. This method helps by encoding the response to utf-8 and parsing the returned XML into and ElementTree object. Returns None if no data exists in the response. TODO: use headers

      Type Parameters

      • T = any

      Parameters

      • path: {
            body?: Record<string, unknown> | BodyInit;
            headers?: Record<string, string>;
            method?: "delete" | "get" | "post" | "put" | "patch" | "head";
            password?: string;
            url: string;
            username?: string;
        }

      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[]>

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

      Parameters

      • identifier: string | number

      Returns Promise<MyPlexUser>

    • Return webhook URLs configured for this Plex account.

      Returns Promise<string[]>

    • This follows the outline described in https://forums.plex.tv/t/authenticating-with-plex/609370 to fetch a token and potentially compromise username and password. To use first call getWebLogin() and present the returned uri to a user to go to, then await webLoginCheck(). If you pass in a forwardUrl, then send the user to the returned uri, and when a request comes in on the passed in url, then await webLoginCheck().

      Parameters

      • forwardUrl: string = null

      Returns Promise<WebLogin>

    • Pass in the webLogin object obtained from getWebLogin() and this will poll Plex to see if the user agreed. It returns a connected MyPlexAccount or throws an error.

      Parameters

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

      Returns Promise<MyPlexAccount>