2022-03-08 08:06:22 +00:00
|
|
|
# MyAnimeList Attributes
|
|
|
|
|
2023-12-31 16:45:00 +00:00
|
|
|
Configuring [MyAnimeList](https://myanimelist.net/) is optional but is required for MyAnimeList based collections and
|
|
|
|
operations to function.
|
2022-03-08 08:06:22 +00:00
|
|
|
|
|
|
|
A `mal` mapping is in the root of the config file.
|
|
|
|
|
|
|
|
Below is a `mal` mapping example and the full set of attributes:
|
2023-11-15 11:44:43 +00:00
|
|
|
|
2022-03-08 08:06:22 +00:00
|
|
|
```yaml
|
|
|
|
mal:
|
|
|
|
client_id: ################################
|
|
|
|
client_secret: ################################################################
|
2022-07-04 06:49:52 +00:00
|
|
|
localhost_url:
|
2022-03-08 08:06:22 +00:00
|
|
|
authorization:
|
|
|
|
access_token:
|
|
|
|
token_type:
|
|
|
|
expires_in:
|
|
|
|
refresh_token:
|
|
|
|
```
|
|
|
|
|
2023-12-13 21:44:44 +00:00
|
|
|
| Attribute | Allowed Values | Required |
|
|
|
|
|:----------------|:--------------------------------------|:------------------------------------------:|
|
|
|
|
| `client_id` | MyAnimeList Application Client ID | :fontawesome-solid-circle-check:{ .green } |
|
|
|
|
| `client_secret` | MyAnimeList Application Client Secret | :fontawesome-solid-circle-check:{ .green } |
|
|
|
|
| `localhost_url` | MyAnimeList Authorization URL | :fontawesome-solid-circle-xmark:{ .red } |
|
2022-03-08 08:06:22 +00:00
|
|
|
|
2024-04-22 14:20:12 +00:00
|
|
|
All other attributes will be filled in by Kometa.
|
2023-11-15 11:44:43 +00:00
|
|
|
|
2024-04-22 14:20:12 +00:00
|
|
|
To connect to MyAnimeList.net you must create a MyAnimeList application and supply Kometa the `client id` and
|
2023-12-31 16:45:00 +00:00
|
|
|
`client secret` provided, please do the following:
|
|
|
|
|
|
|
|
1. [Click here to create a MyAnimeList API application.](https://myanimelist.net/apiconfig/create)
|
2024-04-22 14:20:12 +00:00
|
|
|
2. Enter an `App Name` for the application. Ex. `Kometa`
|
2023-12-31 16:45:00 +00:00
|
|
|
3. Select `web` for `App Type`.
|
2024-04-22 14:20:12 +00:00
|
|
|
4. Enter an `App Description` for the application Ex. `Kometa manages metadata and collections`
|
2023-12-31 16:45:00 +00:00
|
|
|
5. Enter `http://localhost/` for `App Redirect URL`.
|
2024-04-22 14:20:12 +00:00
|
|
|
6. Enter `https://github.com/Kometa-Team/Kometa` for `Homepage URL`.
|
2023-12-31 16:45:00 +00:00
|
|
|
7. Select `non-commercial` for `Commercial / Non-Commercial`.
|
|
|
|
8. Enter any name under `Name / Company Name`.
|
|
|
|
9. Select `hobbyist` for `Purpose of Use`.
|
|
|
|
10. Agree to the API License and Developer Agreement and hit the `Submit` button
|
|
|
|
11. You should see `Successfully registered.` followed by a link that says `Return to list` click this link.
|
|
|
|
12. On this page Click the `Edit` button next to the application you just created.
|
|
|
|
13. Record the `Client ID` and `Client Secret` found on the application page.
|
|
|
|
14. Go to this URL but replace `CLIENT_ID` with your Client ID
|
2023-11-15 11:44:43 +00:00
|
|
|
|
|
|
|
```
|
|
|
|
https://myanimelist.net/v1/oauth2/authorize?response_type=code&client_id=CLIENT_ID&code_challenge=k_UHwN_eHAPQVXiceC-rYGkozKqrJmKxPUIUOBIKo1noq_4XGRVCViP_dGcwB-fkPql8f56mmWj5aWCa2HDeugf6sRvnc9Rjhbb1vKGYLY0IwWsDNXRqXdksaVGJthux
|
|
|
|
```
|
2022-03-08 08:06:22 +00:00
|
|
|
|
2023-12-31 16:45:00 +00:00
|
|
|
15. You should see a page that looks like this
|
2023-11-09 00:10:53 +00:00
|
|
|
|
2023-12-31 16:45:00 +00:00
|
|
|
![MAL Details](images/mal.png)
|
2023-11-06 20:38:00 +00:00
|
|
|
|
2023-12-31 16:45:00 +00:00
|
|
|
16. Click "Allow"
|
|
|
|
17. You will be taken to a page that will not load. That's fine and expected.
|
2023-11-06 20:38:00 +00:00
|
|
|
|
2023-12-31 16:45:00 +00:00
|
|
|
![Localhost Failure](images/localhost-fail.png)
|
2023-11-06 20:38:00 +00:00
|
|
|
|
2023-12-31 16:45:00 +00:00
|
|
|
18. Copy the URL, which will be `localhost/?code=BLAH` and paste in your config file next to `localhost_url`.
|
2023-11-06 20:38:00 +00:00
|
|
|
|
2023-12-31 16:45:00 +00:00
|
|
|
**If you do not see an error as above but instead get taken to some seemingly random website, you probably have a
|
|
|
|
webserver running on your local computer, probably from some sort of tutorial if you don't recall having set one
|
|
|
|
up. For example, some Docker tutorials have you start up local web servers.**
|
2023-11-15 11:44:43 +00:00
|
|
|
|
|
|
|
You will need to stop that web server while you're doing this in order to grab that localhost URL.
|
2022-07-04 06:49:52 +00:00
|
|
|
|
2024-04-22 14:20:12 +00:00
|
|
|
19. Run Kometa and the auth will be completed.
|
2023-11-15 11:44:43 +00:00
|
|
|
|
2024-04-22 14:20:12 +00:00
|
|
|
## Alternative Way of Letting Kometa make the URL
|
2022-07-04 06:49:52 +00:00
|
|
|
|
2024-04-22 14:20:12 +00:00
|
|
|
You can record just your `client_id` and `client_secret` and Kometa will create the url for you described below.
|
2022-03-08 08:06:22 +00:00
|
|
|
|
2024-04-22 14:20:12 +00:00
|
|
|
On the first run, Kometa will walk the user through the OAuth flow by producing a MyAnimeList URL for the
|
2023-12-31 16:45:00 +00:00
|
|
|
user to follow.
|
2023-11-15 11:44:43 +00:00
|
|
|
|
2023-12-31 16:45:00 +00:00
|
|
|
After following the URL login to MyAnimeList.net and authorize the application by clicking the `Allow` button which will
|
|
|
|
redirect the user to `http://localhost/`.
|
2023-11-15 11:44:43 +00:00
|
|
|
|
2024-04-22 14:20:12 +00:00
|
|
|
Copy the entire URL and paste it into Kometa and if the URL is correct then Kometa will populate
|
2023-12-31 16:45:00 +00:00
|
|
|
the `authorization` sub-attributes to use in subsequent runs.
|
2022-05-14 05:36:59 +00:00
|
|
|
|
|
|
|
On first run:
|
|
|
|
```
|
|
|
|
|====================================================================================================|
|
|
|
|
| Connecting to My Anime List... |
|
|
|
|
| |
|
|
|
|
| Navigate to: https://myanimelist.net/v1/oauth2/authorize?response_type=code&client_id=BING&code_challenge=BANG |
|
|
|
|
| |
|
|
|
|
| Login and click the Allow option. You will then be redirected to a localhost |
|
|
|
|
| url that most likely won't load, which is fine. Copy the URL and paste it below |
|
|
|
|
| URL:
|
|
|
|
|
|
|
|
```
|
|
|
|
|
|
|
|
Click on that URL to open your browser to MyAnimeList; you'll be looking at a page like this:
|
|
|
|
|
2023-12-31 16:45:00 +00:00
|
|
|
![MAL Details](images/mal.png)
|
2022-05-14 05:36:59 +00:00
|
|
|
|
|
|
|
Click "Allow", and you will be taken to a page that will not load. That's fine and expected.
|
|
|
|
|
2023-12-31 16:45:00 +00:00
|
|
|
![Localhost Failure](images/localhost-fail.png)
|
2022-05-14 05:36:59 +00:00
|
|
|
|
|
|
|
Copy the URL, which will be `localhost/?code=BLAH` and paste it at the prompt.
|
2022-05-20 23:41:20 +00:00
|
|
|
|
2023-12-31 16:45:00 +00:00
|
|
|
**If you do not see an error as above but instead get taken to some seemingly random website, you probably have a
|
|
|
|
webserver running on your local computer, probably from some sort of tutorial if you don't recall having set one up.
|
|
|
|
For example, some Docker tutorials have you start up local web servers.**
|
2022-05-20 23:41:20 +00:00
|
|
|
|
|
|
|
You will need to stop that web server while you're doing this in order to grab that localhost URL.
|
|
|
|
|
2022-05-14 05:36:59 +00:00
|
|
|
```
|
|
|
|
| URL: http://localhost/?code=BOING
|
2024-04-22 14:20:12 +00:00
|
|
|
| Saving authorization information to /path/to/kometa/config/config.yml |
|
2022-05-14 05:36:59 +00:00
|
|
|
| My Anime List Connection Successful |
|
|
|
|
|====================================================================================================|
|
|
|
|
|
|
|
|
```
|
2022-03-08 08:06:22 +00:00
|
|
|
|
2023-11-15 11:44:43 +00:00
|
|
|
### OAuth Flow using Docker
|
2022-03-08 08:06:22 +00:00
|
|
|
|
2023-12-31 16:45:00 +00:00
|
|
|
To authenticate MyAnimeList the first time, you need run the container with the `-it` flags in order to walk through the
|
|
|
|
OAuth flow mentioned above. Once you have the MyAnimeList authentication data saved into the YAML, you'll be able to run
|
|
|
|
the container normally.
|
2022-03-08 08:06:22 +00:00
|
|
|
|
2024-01-15 21:38:18 +00:00
|
|
|
## Online Authorization
|
2022-11-16 14:30:04 +00:00
|
|
|
|
2024-03-04 23:25:59 +00:00
|
|
|
{%
|
|
|
|
include-markdown "./auth.md"
|
|
|
|
start="# Trakt and MyAnimeList Authentication"
|
|
|
|
%}
|