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

126 lines
39 KiB
Markdown

# UserPlexAccount
Returns the user account data with a valid auth token
## Example Usage
```typescript
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* | :heavy_minus_sign: | Unknown | |
| `adsConsentReminderAt` | *number* | :heavy_minus_sign: | N/A | 1556281940 |
| `adsConsentSetAt` | *number* | :heavy_minus_sign: | N/A | 1556281940 |
| `anonymous` | *boolean* | :heavy_minus_sign: | Unknown | |
| `authToken` | *string* | :heavy_check_mark: | The account token | CxoUzBTSV5hsxjTpFKaf |
| `backupCodesCreated` | *boolean* | :heavy_minus_sign: | If the two-factor authentication backup codes have been created | |
| `confirmed` | *boolean* | :heavy_minus_sign: | If the account has been confirmed | |
| `country` | *string* | :heavy_minus_sign: | The account country | US |
| `email` | *string* | :heavy_check_mark: | The account email address | username@email.com |
| `emailOnlyAuth` | *boolean* | :heavy_minus_sign: | If login with email only is enabled | |
| `experimentalFeatures` | *boolean* | :heavy_minus_sign: | If experimental features are enabled | |
| `friendlyName` | *string* | :heavy_check_mark: | Your account full name | friendlyUsername |
| `entitlements` | *string*[] | :heavy_minus_sign: | List of devices your allowed to use with this account | [] |
| `guest` | *boolean* | :heavy_minus_sign: | If the account is a Plex Home guest user | |
| `hasPassword` | *boolean* | :heavy_minus_sign: | If the account has a password | |
| `home` | *boolean* | :heavy_minus_sign: | If the account is a Plex Home user | |
| `homeAdmin` | *boolean* | :heavy_minus_sign: | If the account is the Plex Home admin | |
| `homeSize` | *number* | :heavy_minus_sign: | The number of accounts in the Plex Home | 1 |
| `id` | *number* | :heavy_check_mark: | The Plex account ID | 13692262 |
| `joinedAt` | *number* | :heavy_check_mark: | Unix epoch datetime in seconds | 1556281940 |
| `locale` | *string* | :heavy_minus_sign: | The account locale | |
| `mailingListActive` | *boolean* | :heavy_minus_sign: | If you are subscribed to the Plex newsletter | |
| `mailingListStatus` | [operations.MailingListStatus](../../models/operations/mailingliststatus.md) | :heavy_minus_sign: | Your current mailing list status | active |
| `maxHomeSize` | *number* | :heavy_minus_sign: | The maximum number of accounts allowed in the Plex Home | 15 |
| ~~`pin`~~ | *string* | :heavy_minus_sign: | : warning: ** DEPRECATED **: This will be removed in a future release, please migrate away from it as soon as possible.<br/><br/>[Might be removed] The hashed Plex Home PIN | |
| `profile` | [shared.UserProfile](../../models/shared/userprofile.md) | :heavy_minus_sign: | N/A | |
| `protected` | *boolean* | :heavy_minus_sign: | If the account has a Plex Home PIN enabled | |
| `rememberExpiresAt` | *number* | :heavy_minus_sign: | Unix epoch datetime in seconds | 1556281940 |
| `restricted` | *boolean* | :heavy_minus_sign: | If the account is a Plex Home managed user | |
| `roles` | *string*[] | :heavy_minus_sign: | [Might be removed] List of account roles. Plexpass membership listed here | |
| `scrobbleTypes` | *string* | :heavy_minus_sign: | Unknown | |
| `services` | [operations.Service](../../models/operations/service.md)[] | :heavy_minus_sign: | N/A | |
| `subscription` | [operations.Subscription1](../../models/operations/subscription1.md) | :heavy_minus_sign: | If the account's Plex Pass subscription is active | |
| `subscriptionDescription` | *string* | :heavy_minus_sign: | Description of the Plex Pass subscription | |
| `subscriptions` | [operations.Subscription2](../../models/operations/subscription2.md)[] | :heavy_minus_sign: | N/A | |
| `thumb` | *string* | :heavy_minus_sign: | URL of the account thumbnail | https://plex.tv/users/a4f43c1ebfde43a5/avatar?c=8372075101 |
| `title` | *string* | :heavy_check_mark: | The title of the account (username or friendly name) | UsernameTitle |
| `twoFactorEnabled` | *boolean* | :heavy_minus_sign: | If two-factor authentication is enabled | |
| `username` | *string* | :heavy_check_mark: | The account username | Username |
| `uuid` | *string* | :heavy_check_mark: | The account UUID | dae343c1f45beb4f |
| `attributionPartner` | *string* | :heavy_minus_sign: | N/A | <nil> |
| `pastSubscriptions` | [operations.PastSubscription](../../models/operations/pastsubscription.md)[] | :heavy_check_mark: | N/A | |
| `trials` | [operations.Trial](../../models/operations/trial.md)[] | :heavy_check_mark: | N/A | |