Home - Aanok/pmcli GitHub Wiki

Manual configuration

First we need to recover a valid authorization token.

  1. Launch Plex from a web browser (through app.plex.tv or directly, it doesn't matter).
  2. Open the Developer Tools: on Firefox and Chromiums you can press F12.
  3. Go to Local Storage > your current page and look for "myPlexAccessToken" and copy the contents.

token get

Create a file called pmcli_config in your $XDG_CONFIG_HOME (or $HOME/.config if that is not set). You might want to chmod 600 pmcli_config.

Fill the file as follows:

plex_token = the_token
base_addr = plex_server_address:port

Do not wrap strings in quotes, just write them down. The address should look something like https://example.com:32400. Additionally, you might add require_hostname_validation = false if the address listed on your webserver's certificate isn't the same your Plex Media Server's (e.g. if you use PMS's builtin certificate).

NOTE: tokens are one each per application, so you will not see an entry for PMCLI under Settings > Devices. You will in fact be using the token linked to the web browser you took it from.