> ## Documentation Index
> Fetch the complete documentation index at: https://personal-92-migrate-dev-docs-guides.mintlify.site/llms.txt
> Use this file to discover all available pages before exploring further.

# Get Token Details

> Get the User data from the provided X-Plex-Token



## OpenAPI

````yaml /openapi-with-code-samples.yaml get /user
openapi: 3.1.1
info:
  title: Plex Media Server
  version: 1.1.1
  license:
    name: Apache 2.0
    url: https://www.apache.org/licenses/LICENSE-2.0.html
servers:
  - url: https://{IP-description}.{identifier}.plex.direct:{port}
    variables:
      identifier:
        description: The unique identifier of this particular PMS
        default: 0123456789abcdef0123456789abcdef
      IP-description:
        description: A `-` separated string of the IPv4 or IPv6 address components
        default: 1-2-3-4
      port:
        default: '32400'
  - url: '{protocol}://{host}:{port}'
    variables:
      protocol:
        description: The network protocol to use. Typically (`http` or `https`)
        default: http
      host:
        description: >
          The Host of the PMS.

          If using on a local network, this is the internal IP address of the
          server hosting the PMS.

          If using on an external network, this is the external IP address for
          your network, and requires port forwarding.

          If using a reverse proxy, this would be the external DNS domain for
          your network, and requires the proxy handle port forwarding. 
        default: localhost
      port:
        description: >
          The Port number configured on the PMS. Typically (`32400`). 

          If using a reverse proxy, this would be the port number configured on
          the proxy.
        default: '32400'
  - url: '{full_server_url}'
    variables:
      full_server_url:
        description: The full manual URL to access the PMS
        default: http://localhost:32400
security:
  - token:
      - shared user
      - admin
tags:
  - name: Activities
    description: >
      Activities provide a way to monitor and control asynchronous operations on
      the server. In order to receive real-time updates for activities, a client
      would normally subscribe via either EventSource or Websocket endpoints.


      Activities are associated with HTTP replies via a special
      `X-Plex-Activity` header which contains the UUID of the activity.


      Activities are optional cancellable. If cancellable, they may be cancelled
      via the `DELETE` endpoint.
  - name: Butler
    description: >-
      The butler is responsible for running periodic tasks.  Some tasks run
      daily, others every few days, and some weekly.  These includes database
      maintenance, metadata updating, thumbnail generation, media analysis, and
      other tasks.
  - name: Collections
    description: API Operations against the Collections
  - name: Content
    description: The actual content of the media provider
  - name: Devices
    description: >
      Media grabbers provide ways for media to be obtained for a given protocol.
      The simplest ones are `stream` and `download`. More complex grabbers can
      have associated devices


      Network tuners can present themselves on the network using the Simple
      Service Discovery Protocol and Plex Media Server will discover them. The
      following XML is an example of the data returned from SSDP. The
      `deviceType`, `serviceType`, and `serviceId` values must remain as they
      are in the example in order for PMS to properly discover the device. Other
      less-obvious fields are described in the parameters section below.


      Example SSDP output

      ```

      <root xmlns="urn:schemas-upnp-org:device-1-0">
          <specVersion>
              <major>1</major>
              <minor>0</minor>
          </specVersion>
          <device>
              <deviceType>urn:plex-tv:device:Media:1</deviceType>
              <friendlyName>Turing Hopper 3000</friendlyName>
              <manufacturer>Plex, Inc.</manufacturer>
              <manufacturerURL>https://plex.tv/</manufacturerURL>
              <modelDescription>Turing Hopper 3000 Media Grabber</modelDescription>
              <modelName>Plex Media Grabber</modelName>
              <modelNumber>1</modelNumber>
              <modelURL>https://plex.tv</modelURL>
              <UDN>uuid:42fde8e4-93b6-41e5-8a63-12d848655811</UDN>
              <serviceList>
                  <service>
                      <URLBase>http://10.0.0.5:8088</URLBase>
                      <serviceType>urn:plex-tv:service:MediaGrabber:1</serviceType>
                      <serviceId>urn:plex-tv:serviceId:MediaGrabber</serviceId>
                  </service>
              </serviceList>
          </device>
      </root>

      ```

        - UDN: (string) A UUID for the device. This should be unique across models of a device at minimum.
        - URLBase: (string) The base HTTP URL for the device from which all of the other endpoints are hosted.
  - name: Download Queue
    description: API Operations against the Download Queue
  - name: DVRs
    description: >
      The DVR provides means to watch and record live TV.  This section of
      endpoints describes how to setup the DVR itself
  - name: EPG
    description: >
      The EPG (Electronic Program Guide) is responsible for obtaining metadata
      for what is airing on each channel and when
  - name: Events
    description: >
      The server can notify clients in real-time of a wide range of events, from
      library scanning, to preferences being modified, to changes to media, and
      many other things. This is also the mechanism by which activity progress
      is reported.


      Two protocols for receiving the events are available: EventSource (also
      known as SSE), and WebSocket.
  - name: General
    description: >-
      General endpoints for basic PMS operation not specific to any media
      provider
  - name: Hubs
    description: The hubs within a media provider
  - name: Library
    description: >-
      Library endpoints which are outside of the Media Provider API.  Typically
      this is manipulation of the library (adding/removing sections, modifying
      preferences, etc).
  - name: Library Collections
    description: >-
      Endpoints for manipulating collections.  In addition to these endpoints,
      `/library/collections/:collectionId/X` will be rerouted to
      `/library/metadata/:collectionId/X` and respond to those endpoints as
      well.
    x-displayName: 'Library: Collections'
  - name: Library Playlists
    description: Endpoints for manipulating playlists.
    x-displayName: 'Library: Playlists'
  - name: Live TV
    description: |
      LiveTV contains the playback sessions of a channel from a DVR device
  - name: Log
    description: Logging mechanism to allow clients to log to the server
  - name: Play Queue
    description: >-
      The playqueue feature within a media provider

      A play queue represents the current list of media for playback. Although
      queues are persisted by the server, they should be regarded by the user as
      a fairly lightweight, an ephemeral list of items queued up for playback in
      a session.  There is generally one active queue for each type of media
      (music, video, photos) that can be added to or destroyed and replaced with
      a fresh queue.

      Play Queues has a region, which we refer to in this doc (partially for
      historical reasons) as "Up Next". This region is defined by
      `playQueueLastAddedItemID` existing on the media container. This follows
      iTunes' terminology. It is a special region after the currently playing
      item but before the originally-played items. This enables "Party Mode"
      listening/viewing, where items can be added on-the-fly, and normal queue
      playback resumed when completed. 

      You can visualize the play queue as a sliding window in the complete list
      of media queued for playback. This model is important when scaling to
      larger play queues (e.g. shuffling 40,000 audio tracks). The client only
      needs visibility into small areas of the queue at any given time, and the
      server can optimize access in this fashion.

      All created play queues will have an empty "Up Next" area - unless the
      item is an album and no `key` is provided. In this case the "Up Next" area
      will be populated by the contents of the album. This is to allow queueing
      of multiple albums - since the 'Add to Up Next' will insert after all the
      tracks. This means that If you're creating a PQ from an album, you can
      only shuffle it if you set `key`. This is due to the above implicit
      queueing of albums when no `key` is provided as well as the current
      limitation that you cannot shuffle a PQ with an "Up Next" area.

      The play queue window advances as the server receives timeline requests.
      The client needs to retrieve the play queue as the “now playing” item
      changes. There is no play queue API to update the playing item.
  - name: Playlist
    description: Media playlists that can be created and played back
  - name: Preferences
    description: API Operations against the Preferences
  - name: Provider
    description: >-
      Media providers are the starting points for the entire Plex Media Server
      media library API.  It defines the paths for the groups of endpoints.  The
      `/media/providers` should be the only hard-coded path in clients when
      accessing the media library.  Non-media library endpoints are outside the
      scope of the media provider.  See the description in See [the section in
      API Info](#section/API-Info/Media-Providers) for more information on how
      to use media providers.
  - name: Rate
    description: Operations for rating media items (thumbs up/down, star ratings, etc.)
  - name: Search
    description: The search feature within a media provider
  - name: Status
    description: >-
      The status endpoints give you information about current playbacks, play
      history, and even terminating sessions.
  - name: Subscriptions
    description: >
      Subscriptions determine which media will be recorded and the criteria for
      selecting an airing when multiple are available
  - name: Timeline
    description: The actions feature within a media provider
  - name: Transcoder
    description: API Operations against the Transcoder
  - name: UltraBlur
    description: Service provided to compute UltraBlur colors and images.
  - name: Updater
    description: >
      This describes the API for searching and applying updates to the Plex
      Media Server.

      Updates to the status can be observed via the Event API.
paths:
  /user:
    get:
      tags:
        - Authentication
      summary: Get Token Details
      description: Get the User data from the provided X-Plex-Token
      operationId: getTokenDetails
      parameters:
        - $ref: '#/components/parameters/accepts'
        - $ref: '#/components/parameters/X-Plex-Client-Identifier'
        - $ref: '#/components/parameters/X-Plex-Product'
        - $ref: '#/components/parameters/X-Plex-Version'
        - $ref: '#/components/parameters/X-Plex-Platform'
        - $ref: '#/components/parameters/X-Plex-Platform-Version'
        - $ref: '#/components/parameters/X-Plex-Device'
        - $ref: '#/components/parameters/X-Plex-Model'
        - $ref: '#/components/parameters/X-Plex-Device-Vendor'
        - $ref: '#/components/parameters/X-Plex-Device-Name'
        - $ref: '#/components/parameters/X-Plex-Marketplace'
      responses:
        '200':
          description: Logged in user details
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/UserPlexAccount'
        '400':
          description: >-
            Bad Request - A parameter was not specified, or was specified
            incorrectly.
          content:
            application/json:
              schema:
                x-speakeasy-name-override: BadRequest
                type: object
                properties:
                  errors:
                    type: array
                    items:
                      type: object
                      properties:
                        code:
                          type: integer
                          format: int32
                          example: 1000
                        message:
                          type: string
                          x-speakeasy-error-message: true
                          example: X-Plex-Client-Identifier is missing
                        status:
                          type: integer
                          format: int32
                          example: 400
        '401':
          description: >-
            Unauthorized - Returned if the X-Plex-Token is missing from the
            header or query.
          content:
            application/json:
              schema:
                x-speakeasy-name-override: Unauthorized
                type: object
                properties:
                  errors:
                    type: array
                    items:
                      type: object
                      properties:
                        code:
                          type: integer
                          format: int32
                          example: 1001
                        message:
                          type: string
                          x-speakeasy-error-message: true
                          example: User could not be authenticated
                        status:
                          type: integer
                          format: int32
                          example: 401
      security:
        - token:
            - admin
      servers:
        - url: https://plex.tv/api/v2
      x-codeSamples:
        - lang: php
          label: PlexPHP
          source: |-
            declare(strict_types=1);

            require 'vendor/autoload.php';

            use LukeHagar\Plex_API;

            $sdk = Plex_API\PlexAPI::builder()
                ->setSecurity(
                    '<YOUR_API_KEY_HERE>'
                )
                ->build();



            $response = $sdk->authentication->getTokenDetails(

            );

            if ($response->userPlexAccount !== null) {
                // handle response
            }
        - lang: ruby
          label: PlexRuby
          source: |-
            require 'plex_ruby_sdk'

            s = ::PlexRubySDK::PlexAPI.new(
                  security: Models::Shared::Security.new(
                    access_token: "<YOUR_API_KEY_HERE>",
                  ),
                )

            res = s.authentication.get_token_details()

            if ! res.user_plex_account.nil?
              # handle response
            end
        - lang: go
          label: PlexGO
          source: "package main\n\nimport(\n\t\"context\"\n\t\"github.com/LukeHagar/plexgo/models/components\"\n\t\"github.com/LukeHagar/plexgo\"\n\t\"github.com/LukeHagar/plexgo/models/operations\"\n\t\"log\"\n)\n\nfunc main() {\n    ctx := context.Background()\n\n    s := plexgo.New(\n        plexgo.WithAccepts(components.AcceptsApplicationXML),\n        plexgo.WithClientIdentifier(\"abc123\"),\n        plexgo.WithProduct(\"Plex for Roku\"),\n        plexgo.WithVersion(\"2.4.1\"),\n        plexgo.WithPlatform(\"Roku\"),\n        plexgo.WithPlatformVersion(\"4.3 build 1057\"),\n        plexgo.WithDevice(\"Roku 3\"),\n        plexgo.WithModel(\"4200X\"),\n        plexgo.WithDeviceVendor(\"Roku\"),\n        plexgo.WithDeviceName(\"Living Room TV\"),\n        plexgo.WithMarketplace(\"googlePlay\"),\n        plexgo.WithSecurity(\"<YOUR_API_KEY_HERE>\"),\n    )\n\n    res, err := s.Authentication.GetTokenDetails(ctx, operations.GetTokenDetailsRequest{})\n    if err != nil {\n        log.Fatal(err)\n    }\n    if res.UserPlexAccount != nil {\n        // handle response\n    }\n}"
        - lang: java
          label: PlexJava
          source: |-
            package hello.world;

            import dev.plexapi.sdk.PlexAPI;
            import dev.plexapi.sdk.models.errors.GetTokenDetailsBadRequest;
            import dev.plexapi.sdk.models.errors.GetTokenDetailsUnauthorized;
            import dev.plexapi.sdk.models.operations.GetTokenDetailsRequest;
            import dev.plexapi.sdk.models.operations.GetTokenDetailsResponse;
            import dev.plexapi.sdk.models.shared.Accepts;
            import java.lang.Exception;

            public class Application {

                public static void main(String[] args) throws GetTokenDetailsBadRequest, GetTokenDetailsUnauthorized, Exception {

                    PlexAPI sdk = PlexAPI.builder()
                            .accepts(Accepts.APPLICATION_XML)
                            .clientIdentifier("abc123")
                            .product("Plex for Roku")
                            .version("2.4.1")
                            .platform("Roku")
                            .platformVersion("4.3 build 1057")
                            .device("Roku 3")
                            .model("4200X")
                            .deviceVendor("Roku")
                            .deviceName("Living Room TV")
                            .marketplace("googlePlay")
                            .token(System.getenv().getOrDefault("TOKEN", ""))
                        .build();

                    GetTokenDetailsRequest req = GetTokenDetailsRequest.builder()
                            .build();

                    GetTokenDetailsResponse res = sdk.authentication().getTokenDetails()
                            .request(req)
                            .call();

                    if (res.userPlexAccount().isPresent()) {
                        // handle response
                    }
                }
            }
        - lang: typescript
          label: PlexJS
          source: |-
            import { PlexAPI } from "@lukehagar/plexjs";
            import { Accepts } from "@lukehagar/plexjs/models/shared";

            const plexAPI = new PlexAPI({
              accepts: Accepts.ApplicationXml,
              clientIdentifier: "abc123",
              product: "Plex for Roku",
              version: "2.4.1",
              platform: "Roku",
              platformVersion: "4.3 build 1057",
              device: "Roku 3",
              model: "4200X",
              deviceVendor: "Roku",
              deviceName: "Living Room TV",
              marketplace: "googlePlay",
              token: "<YOUR_API_KEY_HERE>",
            });

            async function run() {
              const result = await plexAPI.authentication.getTokenDetails({});

              console.log(result);
            }

            run();
components:
  parameters:
    accepts:
      name: accepts
      description: Indicates the client accepts the indicated media types
      in: header
      schema:
        type: string
        default: application/xml
        enum:
          - application/json
          - application/xml
    X-Plex-Client-Identifier:
      name: X-Plex-Client-Identifier
      x-speakeasy-name-override: Client-Identifier
      in: header
      description: An opaque identifier unique to the client
      required: true
      schema:
        type: string
        example: abc123
      example: abc123
    X-Plex-Product:
      name: X-Plex-Product
      x-speakeasy-name-override: Product
      in: header
      description: The name of the client product
      schema:
        type: string
        example: Plex for Roku
      example: Plex for Roku
    X-Plex-Version:
      name: X-Plex-Version
      x-speakeasy-name-override: Version
      in: header
      description: The version of the client application
      schema:
        type: string
        example: 2.4.1
      example: 2.4.1
    X-Plex-Platform:
      name: X-Plex-Platform
      x-speakeasy-name-override: Platform
      in: header
      description: The platform of the client
      schema:
        type: string
        example: Roku
      example: Roku
    X-Plex-Platform-Version:
      name: X-Plex-Platform-Version
      x-speakeasy-name-override: Platform-Version
      in: header
      description: The version of the platform
      schema:
        type: string
        example: 4.3 build 1057
      example: 4.3 build 1057
    X-Plex-Device:
      name: X-Plex-Device
      x-speakeasy-name-override: Device
      in: header
      description: A relatively friendly name for the client device
      schema:
        type: string
        example: Roku 3
      example: Roku 3
    X-Plex-Model:
      name: X-Plex-Model
      x-speakeasy-name-override: Model
      in: header
      description: A potentially less friendly identifier for the device model
      schema:
        type: string
        example: 4200X
      example: 4200X
    X-Plex-Device-Vendor:
      name: X-Plex-Device-Vendor
      x-speakeasy-name-override: Device-Vendor
      in: header
      description: The device vendor
      schema:
        type: string
        example: Roku
      example: Roku
    X-Plex-Device-Name:
      name: X-Plex-Device-Name
      x-speakeasy-name-override: Device-Name
      in: header
      description: A friendly name for the client
      schema:
        type: string
        example: Living Room TV
      example: Living Room TV
    X-Plex-Marketplace:
      name: X-Plex-Marketplace
      x-speakeasy-name-override: Marketplace
      in: header
      description: The marketplace on which the client application is distributed
      schema:
        type: string
        example: googlePlay
      example: googlePlay
  schemas:
    UserPlexAccount:
      title: UserPlexAccount
      type: object
      required:
        - authToken
        - email
        - friendlyName
        - hasPassword
        - id
        - joinedAt
        - title
        - twoFactorEnabled
        - username
        - uuid
      properties:
        adsConsent:
          type:
            - boolean
            - 'null'
          description: Unknown
        adsConsentReminderAt:
          oneOf:
            - $ref: '#/components/schemas/PlexDateTime'
            - type: 'null'
        adsConsentSetAt:
          oneOf:
            - $ref: '#/components/schemas/PlexDateTime'
            - type: 'null'
        anonymous:
          type:
            - boolean
            - 'null'
          description: Unknown
          default: false
        authToken:
          type: string
          description: The account token
          example: CxoUzBTSV5hsxjTpFKaf
        backupCodesCreated:
          type: boolean
          description: If the two-factor authentication backup codes have been created
          default: false
        confirmed:
          type: boolean
          description: If the account has been confirmed
          default: false
        country:
          type: string
          description: The account country
          example: US
          maxLength: 2
          minLength: 2
        email:
          type: string
          description: The account email address
          format: email
          example: username@email.com
        emailOnlyAuth:
          type: boolean
          description: If login with email only is enabled
          default: false
        experimentalFeatures:
          type: boolean
          description: If experimental features are enabled
          default: false
        friendlyName:
          type: string
          description: Your account full name
          example: friendlyUsername
        entitlements:
          type: array
          description: List of devices your allowed to use with this account
          items:
            type: string
          example: '[]'
        guest:
          type: boolean
          description: If the account is a Plex Home guest user
          default: false
        hasPassword:
          type: boolean
          description: If the account has a password
          default: true
        home:
          type: boolean
          description: If the account is a Plex Home user
          default: false
        homeAdmin:
          type: boolean
          description: If the account is the Plex Home admin
          default: false
        homeSize:
          type: integer
          description: The number of accounts in the Plex Home
          example: 1
          format: int32
        id:
          type: integer
          description: The Plex account ID
          example: 13692262
          format: int32
        joinedAt:
          $ref: '#/components/schemas/PlexDateTime'
        locale:
          type:
            - string
            - 'null'
          description: The account locale
        mailingListActive:
          type: boolean
          description: If you are subscribed to the Plex newsletter
          default: false
        mailingListStatus:
          description: Your current mailing list status
          enum:
            - active
            - unsubscribed
            - removed
          x-speakeasy-enums:
            - ACTIVE
            - UNSUBSCRIBED
            - REMOVED
          example: active
        maxHomeSize:
          type: integer
          description: The maximum number of accounts allowed in the Plex Home
          example: 15
          format: int32
        pin:
          type: string
          description: '[Might be removed] The hashed Plex Home PIN '
          deprecated: true
        profile:
          $ref: '#/components/schemas/UserProfile'
        protected:
          type: boolean
          description: If the account has a Plex Home PIN enabled
          default: false
        rememberExpiresAt:
          $ref: '#/components/schemas/PlexDateTime'
        restricted:
          type: boolean
          description: If the account is a Plex Home managed user
          default: false
        roles:
          type: array
          description: >-
            [Might be removed] List of account roles. Plexpass membership listed
            here
          items:
            type: string
        scrobbleTypes:
          type: string
          description: Unknown
        services:
          type: array
          items:
            type: object
            required:
              - identifier
              - endpoint
              - token
              - secret
              - status
            properties:
              identifier:
                type: string
                example: metadata-dev
              endpoint:
                type: string
                example: https://epg.provider.plex.tv
                format: uri
              token:
                type:
                  - string
                  - 'null'
                example: DjoMtqFAGRL1uVtCyF1dKIorTbShJeqv
              secret:
                type:
                  - string
                  - 'null'
              status:
                example: online
                x-speakeasy-unknown-values: allow
                enum:
                  - online
                  - offline
                x-speakeasy-enums:
                  - ONLINE
                  - OFFLINE
        subscription:
          description: If the account's Plex Pass subscription is active
          title: Subscription
          type: object
          properties:
            features:
              description: List of features allowed on your Plex Pass subscription
              type: array
              items:
                type: string
                description: |
                  - Android - Dolby Vision
                  - Android - PiP
                  - CU Sunset
                  - HRK_enable_EUR
                  - TREBLE-show-features
                  - ad-countdown-timer
                  - adaptive_bitrate
                  - album-types
                  - allow_dvr
                  - amazon-loop-debug
                  - avod-ad-analysis
                  - avod-new-media
                  - blacklist_get_signin
                  - boost-voices
                  - camera_upload
                  - client-radio-stations
                  - cloudflare-turnstile-required
                  - cloudsync
                  - collections
                  - comments_and_replies_push_notifications
                  - community_access_plex_tv
                  - companions_sonos
                  - content_filter
                  - custom-home-removal
                  - disable_home_user_friendships
                  - disable_sharing_friendships
                  - downloads-gating
                  - drm_support
                  - dvr
                  - dvr-block-unsupported-countries
                  - epg-recent-channels
                  - exclude restrictions
                  - federated-auth
                  - friend_request_push_notifications
                  - grandfather-sync
                  - guided-upgrade
                  - hardware_transcoding
                  - home
                  - hwtranscode
                  - imagga-v2
                  - increase-password-complexity
                  - ios14-privacy-banner
                  - iterable-notification-tokens
                  - item_clusters
                  - keep-payment-method
                  - kevin-bacon
                  - korea-consent
                  - le_isrg_root_x1
                  - lets_encrypt
                  - lightning-dvr-pivot
                  - live-tv-support-incomplete-segments
                  - livetv
                  - lyrics
                  - metadata_search
                  - music-analysis
                  - music_videos
                  - new_plex_pass_prices
                  - news-provider-sunset-modal
                  - nominatim
                  - pass
                  - photos-favorites
                  - photos-metadata-edition
                  - photosV6-edit
                  - photosV6-tv-albums
                  - pms_health
                  - premium-dashboard
                  - premium_music_metadata
                  - radio
                  - rate-limit-client-token
                  - scrobbling-service-plex-tv
                  - session_bandwidth_restrictions
                  - session_kick
                  - shared_server_notification
                  - shared_source_notification
                  - signin_notification
                  - signin_with_apple
                  - silence-removal
                  - sleep-timer
                  - spring_serve_ad_provider
                  - sync
                  - sweet-fades
                  - transcoder_cache
                  - trailers
                  - tuner-sharing
                  - two-factor-authentication
                  - unsupportedtuners
                  - upgrade-3ds2
                  - visualizers
                  - vod-schema
                  - vod_cloudflare
                  - volume-leveling
                  - watch-together-invite
                  - watchlist-rss
                  - web_server_dashboard
                  - webhooks
                  - blacklist-subnets
                  - chromecast-music-mp
                  - Sync v3
                  - livetv-platform-specific
                  - nonAnonymousAccount
                  - parental-controls
                  - Subtitles on Demand
                  - ultrablur
                  - web-desktop-gracenote-banner
            active:
              description: If the account's Plex Pass subscription is active
              type: boolean
              example: true
            subscribedAt:
              description: Date the account subscribed to Plex Pass
              type:
                - string
                - 'null'
              example: '2021-04-12T18:21:12Z'
            status:
              description: String representation of subscriptionActive
              example: Inactive
              x-speakeasy-unknown-values: allow
              enum:
                - Inactive
                - Active
              x-speakeasy-enums:
                - INACTIVE
                - ACTIVE
            paymentService:
              description: Payment service used for your Plex Pass subscription
              type:
                - string
                - 'null'
            plan:
              description: Name of Plex Pass subscription plan
              type:
                - string
                - 'null'
        subscriptionDescription:
          type:
            - string
            - 'null'
          description: Description of the Plex Pass subscription
        subscriptions:
          type: array
          items:
            title: Subscription
            type: object
            properties:
              features:
                description: List of features allowed on your Plex Pass subscription
                type: array
                items:
                  type: string
                  description: |
                    - Android - Dolby Vision
                    - Android - PiP
                    - CU Sunset
                    - HRK_enable_EUR
                    - TREBLE-show-features
                    - ad-countdown-timer
                    - adaptive_bitrate
                    - album-types
                    - allow_dvr
                    - amazon-loop-debug
                    - avod-ad-analysis
                    - avod-new-media
                    - blacklist_get_signin
                    - boost-voices
                    - camera_upload
                    - client-radio-stations
                    - cloudflare-turnstile-required
                    - cloudsync
                    - collections
                    - comments_and_replies_push_notifications
                    - community_access_plex_tv
                    - companions_sonos
                    - content_filter
                    - custom-home-removal
                    - disable_home_user_friendships
                    - disable_sharing_friendships
                    - downloads-gating
                    - drm_support
                    - dvr
                    - dvr-block-unsupported-countries
                    - epg-recent-channels
                    - exclude restrictions
                    - federated-auth
                    - friend_request_push_notifications
                    - grandfather-sync
                    - guided-upgrade
                    - hardware_transcoding
                    - home
                    - hwtranscode
                    - imagga-v2
                    - increase-password-complexity
                    - ios14-privacy-banner
                    - iterable-notification-tokens
                    - item_clusters
                    - keep-payment-method
                    - kevin-bacon
                    - korea-consent
                    - le_isrg_root_x1
                    - lets_encrypt
                    - lightning-dvr-pivot
                    - live-tv-support-incomplete-segments
                    - livetv
                    - lyrics
                    - metadata_search
                    - music-analysis
                    - music_videos
                    - new_plex_pass_prices
                    - news-provider-sunset-modal
                    - nominatim
                    - pass
                    - photos-favorites
                    - photos-metadata-edition
                    - photosV6-edit
                    - photosV6-tv-albums
                    - pms_health
                    - premium-dashboard
                    - premium_music_metadata
                    - radio
                    - rate-limit-client-token
                    - scrobbling-service-plex-tv
                    - session_bandwidth_restrictions
                    - session_kick
                    - shared_server_notification
                    - shared_source_notification
                    - signin_notification
                    - signin_with_apple
                    - silence-removal
                    - sleep-timer
                    - spring_serve_ad_provider
                    - sync
                    - sweet-fades
                    - transcoder_cache
                    - trailers
                    - tuner-sharing
                    - two-factor-authentication
                    - unsupportedtuners
                    - upgrade-3ds2
                    - visualizers
                    - vod-schema
                    - vod_cloudflare
                    - volume-leveling
                    - watch-together-invite
                    - watchlist-rss
                    - web_server_dashboard
                    - webhooks
                    - blacklist-subnets
                    - chromecast-music-mp
                    - Sync v3
                    - livetv-platform-specific
                    - nonAnonymousAccount
                    - parental-controls
                    - Subtitles on Demand
                    - ultrablur
                    - web-desktop-gracenote-banner
              active:
                description: If the account's Plex Pass subscription is active
                type: boolean
                example: true
              subscribedAt:
                description: Date the account subscribed to Plex Pass
                type:
                  - string
                  - 'null'
                example: '2021-04-12T18:21:12Z'
              status:
                description: String representation of subscriptionActive
                example: Inactive
                x-speakeasy-unknown-values: allow
                enum:
                  - Inactive
                  - Active
              paymentService:
                description: Payment service used for your Plex Pass subscription
                type:
                  - string
                  - 'null'
              plan:
                description: Name of Plex Pass subscription plan
                type:
                  - string
                  - 'null'
        thumb:
          type: string
          description: URL of the account thumbnail
          format: uri
          example: https://plex.tv/users/a4f43c1ebfde43a5/avatar?c=8372075101
        title:
          type: string
          description: The title of the account (username or friendly name)
          example: UsernameTitle
        twoFactorEnabled:
          type: boolean
          description: If two-factor authentication is enabled
          default: false
        username:
          type: string
          description: The account username
          example: Username
        uuid:
          type: string
          description: The account UUID
          example: dae343c1f45beb4f
        attributionPartner:
          type:
            - string
            - 'null'
          example: null
    PlexDateTime:
      type:
        - integer
      example: 1556281940
      description: Unix epoch datetime in seconds
      format: int64
    UserProfile:
      title: UserProfile
      type: object
      required:
        - autoSelectAudio
        - defaultAudioLanguage
        - defaultSubtitleLanguage
        - autoSelectSubtitle
        - defaultSubtitleAccessibility
        - defaultSubtitleForced
        - watchedIndicator
        - mediaReviewsVisibility
      properties:
        autoSelectAudio:
          description: >-
            If the account has automatically select audio and subtitle tracks
            enabled
          type: boolean
          example: true
          default: true
        defaultAudioLanguage:
          description: The preferred audio language for the account
          type:
            - string
            - 'null'
          example: ja
        defaultAudioAccessibility:
          allOf:
            - type: integer
              format: int32
              enum:
                - 0
                - 1
                - 2
                - 3
              example: 0
              default: 0
              x-speakeasy-enums:
                - PREFER_NON_ACCESSIBILITY
                - PREFER_ACCESSIBILITY
                - ONLY_ACCESSIBILITY
                - ONLY_NON_ACCESSIBILITY
            - description: >-
                The audio accessibility mode (0 = Prefer non-accessibility
                audio, 1 = Prefer accessibility audio, 2 = Only show
                accessibility audio, 3 = Only show non-accessibility audio)
        defaultAudioLanguages:
          description: The preferred audio languages for the account
          type:
            - array
            - 'null'
          items:
            type: string
          example: null
        defaultSubtitleLanguage:
          description: The preferred subtitle language for the account
          type:
            - string
            - 'null'
          example: en
        defaultSubtitleLanguages:
          description: The preferred subtitle languages for the account
          type:
            - array
            - 'null'
          items:
            type: string
          example: null
        autoSelectSubtitle:
          allOf:
            - type: integer
              format: int32
              enum:
                - 0
                - 1
                - 2
              example: 1
              default: 0
              x-speakeasy-enums:
                - MANUALLY_SELECTED
                - SHOWN_WITH_FOREIGN_AUDIO
                - ALWAYS_ENABLED
            - description: >-
                The auto-select subtitle mode (0 = Manually selected, 1 = Shown
                with foreign audio, 2 = Always enabled)
        defaultSubtitleAccessibility:
          allOf:
            - type: integer
              format: int32
              enum:
                - 0
                - 1
                - 2
                - 3
              example: 1
              default: 0
              x-speakeasy-enums:
                - PREFER_NON_SDH
                - PREFER_SDH
                - ONLY_SDH
                - ONLY_NON_SDH
            - description: >-
                The subtitles for the deaf or hard-of-hearing (SDH) searches
                mode (0 = Prefer non-SDH subtitles, 1 = Prefer SDH subtitles, 2
                = Only show SDH subtitles, 3 = Only show non-SDH subtitles)
        defaultSubtitleForced:
          allOf:
            - type: integer
              format: int32
              enum:
                - 0
                - 1
                - 2
                - 3
              example: 1
              default: 0
              x-speakeasy-enums:
                - PREFER_NON_FORCED
                - PREFER_FORCED
                - ONLY_FORCED
                - ONLY_NON_FORCED
            - description: >-
                The forced subtitles searches mode (0 = Prefer non-forced
                subtitles, 1 = Prefer forced subtitles, 2 = Only show forced
                subtitles, 3 = Only show non-forced subtitles)
        watchedIndicator:
          allOf:
            - type: integer
              format: int32
              enum:
                - 0
                - 1
                - 2
                - 3
              example: 1
              default: 0
              x-speakeasy-enums:
                - NONE
                - MOVIES_AND_TV_SHOWS
                - MOVIES
                - TV_SHOWS
            - description: >-
                Whether or not media watched indicators are enabled (little
                orange dot on media)
        mediaReviewsVisibility:
          allOf:
            - type: integer
              format: int32
              enum:
                - 0
                - 1
                - 2
                - 3
              example: 1
              default: 0
              x-speakeasy-enums:
                - NO_ONE
                - CRITICS_ONLY
                - PLEX_USERS_ONLY
                - PLEX_USERS_AND_CRITICS
            - description: Whether or not the account has media reviews visibility enabled
        mediaReviewsLanguages:
          description: The languages for media reviews visibility
          type:
            - array
            - 'null'
          items:
            type: string
          example: null
  securitySchemes:
    token:
      name: X-Plex-Token
      description: >
        The token which identifies the user accessing the PMS. This can be
        either:

        - A traditional access token obtained from plex.tv

        - A JWT token obtained through the JWT authentication flow


        JWT tokens provide better security with:

        - Short-lived tokens (7 days expiration)

        - Public-key cryptography (ED25519)

        - Better clock synchronization

        - Individual device revocation capability
      type: apiKey
      in: header

````