IReader uses MyAnimeList's OAuth 2.0 API with PKCE (Proof Key for Code Exchange) for tracking manga/novels. This guide will help you configure your MAL API application.
- Client ID:
6114d00ca681b7701d1e15fe11a4987e(already configured in the app) - OAuth Flow: Authorization Code with PKCE
- Redirect URI: Not required (manual code copy flow)
Unlike traditional OAuth flows, MAL with PKCE doesn't require a redirect URI because:
- The authorization happens in a web browser
- The user manually copies the authorization code from the URL
- The app never receives an automatic callback
This is the same approach used by Mihon/Tachiyomi and other manga tracking apps.
If you want to use your own Client ID instead of the shared one:
- Go to https://myanimelist.net/apiconfig
- Log in with your MAL account
- Click "Create ID" to create a new API application
- App Name: IReader (or your preferred name)
- App Type: Select "web"
- App Description: Novel/Manga reading and tracking application
- App Redirect URL: Leave this EMPTY or use
urn:ietf:wg:oauth:2.0:oob- The special URI
urn:ietf:wg:oauth:2.0:oobtells MAL this is an "out-of-band" flow - This means the authorization code will be displayed to the user instead of redirected
- The special URI
- Homepage URL: https://github.com/IReaderorg/IReader (or your fork)
- Commercial / Non-Commercial: Non-Commercial
After creating the application:
- You'll receive a Client ID (a long alphanumeric string)
- Note: MAL doesn't provide a Client Secret for PKCE flows - you only need the Client ID
Replace the Client ID in the code:
File: IReader/data/src/commonMain/kotlin/ireader/data/tracking/mal/MyAnimeListApi.kt
companion object {
const val API_URL = "https://api.myanimelist.net/v2"
const val AUTH_URL = "https://myanimelist.net/v1/oauth2/authorize"
const val TOKEN_URL = "https://myanimelist.net/v1/oauth2/token"
const val BASE_MANGA_URL = "https://myanimelist.net/manga/"
// Replace with your Client ID
const val CLIENT_ID = "YOUR_CLIENT_ID_HERE"
}- User clicks "Login to MAL" in IReader settings
- App generates a random 128-character
code_verifier - App creates a
code_challengefrom the verifier - App builds the authorization URL with the challenge
https://myanimelist.net/v1/oauth2/authorize?
response_type=code&
client_id=YOUR_CLIENT_ID&
code_challenge=GENERATED_CHALLENGE&
code_challenge_method=plain
- User opens the URL in their browser
- Logs in to MAL (if not already logged in)
- Clicks "Allow" to authorize the app
- MAL redirects to a page showing the authorization code
- The authorization code appears in the URL or on the page
- User copies the code
- User pastes it back into IReader
- App sends the authorization code + stored
code_verifierto MAL - MAL validates the code and verifier match
- MAL returns an access token and refresh token
- App stores the tokens for future API calls
PKCE (Proof Key for Code Exchange) adds security to the OAuth flow:
- Prevents authorization code interception attacks
- No need for a client secret (which can't be kept secret in mobile apps)
- Industry standard for mobile and desktop applications
- Build and run IReader
- Go to Settings → Tracking
- Enable MyAnimeList
- Click "Login"
- Copy the generated URL and open in browser
- Authorize the app
- Copy the authorization code from the URL
- Paste it in IReader
- Login should succeed
- Cause: The app is not generating the PKCE challenge correctly
- Solution: Make sure you're using the latest version with the PKCE fix
- Cause: The Client ID is incorrect or the API application is not configured
- Solution: Double-check your Client ID in the MAL API config page
- Cause: The authorization code has expired or was already used
- Solution: Generate a new authorization URL and try again
- Cause: Redirect URL might be configured incorrectly
- Solution: Make sure the redirect URL is empty or set to
urn:ietf:wg:oauth:2.0:oob
MyAnimeList API has rate limits:
- Requests per minute: Not officially documented, but generally generous
- Best practice: Cache responses and avoid unnecessary API calls
- IReader automatically handles token refresh when needed
✅ The app is already configured with a working Client ID
✅ PKCE implementation is complete and working
✅ No redirect URI configuration needed
✅ Ready to use out of the box
You can use the existing configuration without any changes to the MAL API settings!