Skip to content

Trakt and MyAnimeList Authentication

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 scripts allow you to authorize Trakt and MyAnimeList here on the wiki. Once authorized, the script will give you a YAML block that you will copy into the config.yml, replacing the existing trakt and/or myanimelist sections.

The source code for these scripts can be found on the Trakt-MAL-OAuth Repository.

Usage

  1. Enter client ID and secret.
  2. For Trakt, if you didn't retrieve a PIN yourself less than ten minutes ago, click the button, and enter the PIN in the field.
  3. For MyAnimeList, click the button to authenticate and get the required "localhost URL"
  4. Click "Submit"
  5. Copy and paste the result into your Kometa config.

Running the Authentication Scripts Locally

For users who want full control over the scripts and would prefer the run them locally, you can run the script in docker or python by following the instructions in the Trakt-MAL-OAuth Repository.

Click for instructions on how to run the scripts locally

Ensure you have downloaded a copy of the Trakt-MAL-OAuth Repository. If you have downloaded the ZIP file, extract it to your desired location.

Running in Docker

  1. build the image with docker build -t kometa-auth-image .
  2. run the container with docker run --rm kometa-auth-image
  3. If you get a message complaining that something else is already running on port 5000, run the container with docker run --rm -p 5001:5000 kometa-auth-image
  4. go to http://127.0.0.1:5000 OR http://127.0.0.1:5001.
  5. see instructions above

Running in Python

  1. Make sure you are running a recent Python [this was developed on Python 3.11]
  2. Run these commands to create a virtual environment and install requirements.
    python3 -m venv kometa-auth-venv
    . kometa-auth-venv/bin/activate
    python -m pip install -r requirements.txt
    
  3. run the script with python app.py
  4. If you get a message complaining that something else is already running on port 5000, open app.py and change the 5000 on the last line to 5001; repeat step 3.
  5. go to http://127.0.0.1:5000 OR http://127.0.0.1:5001.
  6. see instructions above

Docker or the already deployed version are recommended.