๐ Authentication
Set up Trakt OAuth via the device flow โ tokens are saved to the macOS Keychain, never to config files.
Trakt uses OAuth 2.0. The npm run setup script handles the full device flow โ
you never manage tokens manually.
โ๏ธ How it works
- Run
npm run setup - Enter your Client ID and Client Secret from trakt.tv/oauth/applications
- Visit the URL shown (e.g.
https://trakt.tv/activate), enter the displayed code - Tokens are saved to the macOS Keychain โ the server reads them automatically on every start
To refresh an expired token, just run npm run setup again.
๐งช Test your credentials
curl -s https://api.trakt.tv/users/me \
-H "trakt-api-version: 2" \
-H "trakt-api-key: YOUR_CLIENT_ID" \
-H "Authorization: Bearer YOUR_ACCESS_TOKEN" | jq .username๐ก๏ธ Security best practices
- Credentials are stored in the macOS Keychain โ never in plain files or config
- Rotate your access token if it is accidentally exposed โ run
npm run setupagain - Trakt access tokens expire after 90 days โ re-run
npm run setupto refresh - Treat your access token like a password: full account access with history/checkin write rights