Skip to content

Trakt Attributes

Configuring Trakt.tv is optional but is required for Trakt based collections to function.

A trakt mapping is in the root of the config file, sampled below.

config.yml Trakt sample
trakt:
  client_id: 1a2b3c4d5e6f7g8h9i
  client_secret: 1a12b23c34d45e56f6
  pin:
  force_refresh: false
  authorization:
    access_token: 4cc355t0k3nh3r3
    token_type: Bearer
    expires_in: 1928374655
    refresh_token: r3fr35ht0k3nh3r3
    scope: public 
    created_at: 137946258
Attribute Description Allowed Values (default in bold) Required
client_id Trakt application client ID. Any valid ID or leave blank
client_secret Trakt application client secret. Any valid secret or leave blank
pin Trakt PIN. PIN string or leave blank
force_refresh Refresh credentials on every run. 'true' or 'false'

All other attributes will be filled in by Kometa as part of the authentication process

Important Note on "Authentication Process":

The Trakt authentication process is interactive; Kometa will display a URL in the console output and then wait for you to visit that URL in order to grant access and then paste in some additional information. In order for this to happen you need to run Kometa in an interactive mode, which can be fussy in some contexts (e.g., running Kometa in a Docker container on a NAS). For this reason, it is far simpler to use the form down below to perform these steps; it does all the same steps, but takes them out of the Kometa script execution. The form will produce a complete authentication block as shown above ready for you to copy-paste into your config.yml.

Trakt Authentication

To connect to Trakt.tv you must create a Trakt application and supply Kometa the client_id,client_secret, and pin provided, please do the following:

  1. Click here to create a Trakt API application.
  2. Enter a Name for the application.
  3. Enter urn:ietf:wg:oauth:2.0:oob for Redirect uri.
  4. Click the SAVE APP button.
  5. Record the Client ID and Client Secret as client_id and client_secret in your Configuration File.
  6. Click the Green Authorize Button next to the Redirect URI.

    Trakt Authorize

  7. Record the PIN as pin in your Configuration File.

Warning

Run Kometa shortly after obtaining your PIN; the PIN may expire at some point.

Online Authorization

When trying to authorize Trakt or MyAnimeList, Kometa needs to run in interactive mode so that you can enter details. This is problematic on some setups [namely docker] where entering interactive mode is not always simple.

These webapps allow you to authorize Trakt and MyAnimeList outside of a Kometa run. Once authorized, you will have a YAML block that you will copy into the config.yml, replacing the existing trakt and/or myanimelist sections.

Nothing is cached or retained.

The source code can be found here.

Usage

  1. Choose the authentication you are interested in.
  2. Follow the prompts
  3. Copy and paste the result into your Kometa config.

Running this Locally

For users who want full control over this and would prefer to run them locally, you can do so by following the instructions in the repo.