Getting Startedยถ

This guide will help you set up Plex integration with plistsync from start to finish.

Prerequisitesยถ

Installationยถ

First, install the Plex optional dependencies:

pip install 'plistsync[plex]'
uv add plistsync --extra plex

Plex Accountยถ

Youโ€™ll need an active Plex account to use this application. If you donโ€™t have one, sign up at plex.tv. Additionally, you must have a self-hosted Plex Media Server instance running, as some API endpoints are not available through the public Plex API and require direct server access.

Configurationยถ

Enable Plex in your plistsync configuration file:

# ./config/config.yaml
services:
  plex:
    enabled: true
    server_url: your_plex_server_url_here
    server_name: optional_server_name

Authenticationยถ

Once configured, authenticate plistsync with your Plex account:

plistsync auth plex

This will start an interactive authentication flow:

  1. Youโ€™ll be prompted to open a browser to Plexโ€™s authorization page

  2. Log in with your Plex credentials

  3. Grant plistsync the requested permissions

  4. This will save an authentication token in the config folder

Authentication Previewยถ

 plistsync auth plex Usage: plistsync auth plex [OPTIONS] Authenticate with Plex to obtain an access token. This will open a browser window to log in to Plex and obtain an access token. โ•ญโ”€ Options โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ•ฎ โ”‚--mode-m[forward|polling]If set to 'polling', the CLI will not   โ”‚ โ”‚start a local server and instead ask youโ”‚ โ”‚to paste the redirected URL after login.โ”‚ โ”‚This should be used if you are running  โ”‚ โ”‚the CLI on a remote server without      โ”‚ โ”‚browser access.                         โ”‚ โ”‚[default: forward]                      โ”‚ โ”‚--port-pINTEGER          Port for the local server (if 'forward' โ”‚ โ”‚mode is used).                          โ”‚ โ”‚--force-fForce re-authentication even if a valid โ”‚ โ”‚token exists.                           โ”‚ โ”‚--helpShow this message and exit.โ”‚ โ•ฐโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ•ฏ
 plistsync auth plex Usage: plistsync auth plex [OPTIONS] Authenticate with Plex to obtain an access token. This will open a browser window to log in to Plex and obtain an access token. โ•ญโ”€ Options โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ•ฎ โ”‚--mode-m[forward|polling]If set to 'polling', the CLI will not   โ”‚ โ”‚start a local server and instead ask youโ”‚ โ”‚to paste the redirected URL after login.โ”‚ โ”‚This should be used if you are running  โ”‚ โ”‚the CLI on a remote server without      โ”‚ โ”‚browser access.                         โ”‚ โ”‚[default: forward]                      โ”‚ โ”‚--port-pINTEGER          Port for the local server (if 'forward' โ”‚ โ”‚mode is used).                          โ”‚ โ”‚--force-fForce re-authentication even if a valid โ”‚ โ”‚token exists.                           โ”‚ โ”‚--helpShow this message and exit.โ”‚ โ•ฐโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ•ฏ

Verificationยถ

Test that everything is working by getting your user data:

from plistsync.services.plex.api import PlexApi
print(PlexApi().identity())

This should return your machineIdentifier and some related metadata.