Overview
Obsidian Chess Studio supports automatic synchronization with Lichess and Chess.com, allowing you to:- Import games automatically from both platforms
- Track rating progression across platforms
- Access profile data including statistics and ratings
- Download games on demand with flexible filtering
Lichess Integration
OAuth Authentication
Lichess uses OAuth 2.0 with PKCE (Proof Key for Code Exchange) for secure authentication:Authentication Flow
Security Features
PKCE Protection: The OAuth flow uses PKCE to prevent authorization code interception attacks, even though the client is a native application.
Lichess API Access
Once authenticated, access Lichess data:Public Profile Access
Access public profiles without authentication:Chess.com Integration
Public API
Chess.com does not require OAuth for reading public data:Usage
Game Downloads
Automatic Sync
Games are automatically downloaded when you connect an account:Sync State Tracking
The application tracks sync state to avoid re-downloading games:Incremental Sync
Only new games are downloaded on subsequent syncs:last_game_id to fetch only games after the last sync.
Rate Limiting
Request Configuration
All API requests use proper timeouts and user agent:Best Practices
Tournament Creation (Lichess)
Create Arena Tournament
Create Lichess tournaments directly from the application:Tournament Parameters
Tournament name (max 30 characters)
Initial time in minutes (e.g., 3 for 3+2 blitz)
Increment in seconds per move
Tournament duration in minutes (10-720)
Start date in ISO 8601 format. Omit for immediate start.
Chess variant:
standard, chess960, crazyhouse, antichess, atomic, horde, kingOfTheHill, racingKings, threeCheckWhether games affect player ratings
Allow berserk (halve time for +1 point)
Enable arena streaks
Tournament description (supports Markdown)
Error Handling
Connection Errors
Token Expiration
Privacy & Data Storage
Token Storage
Security: Access tokens are stored securely using the platform’s keychain:
- macOS: Keychain
- Windows: Credential Manager
- Linux: Secret Service API (libsecret)
Stored Data
The application stores:- Access tokens (encrypted in system keychain)
- Account usernames
- Sync state (last sync timestamp, last game ID)
- Downloaded games (in local SQLite database)
Data Privacy
- No password storage: The app never stores or transmits passwords
- Token scope: Lichess tokens only have
preference:readscope (minimal permissions) - Local storage: All game data is stored locally, never uploaded to external servers
- GDPR compliance: Users can delete all data by removing the database file
Troubleshooting
OAuth Callback Not Working
OAuth Callback Not Working
If the OAuth callback fails:
- Check firewall: Ensure localhost connections are allowed
- Port conflict: The app uses a random available port; restart the app to try a different port
- Browser issues: Try a different default browser
- Manual token: As a workaround, create a token manually at https://lichess.org/account/oauth/token
Token Invalid or Expired
Token Invalid or Expired
If you receive 401 errors:
- Re-authenticate: Disconnect and reconnect the account
- Check scope: Ensure the token has
preference:readscope - Revoked access: The user may have revoked access on Lichess; check https://lichess.org/account/oauth/app
Sync Taking Too Long
Sync Taking Too Long
For accounts with thousands of games:
- First sync: Initial sync can take several minutes
- Rate limiting: The application respects API rate limits
- Background sync: Close the app and sync will continue in background (future feature)
- Incremental sync: Subsequent syncs are much faster (only new games)
Chess.com Profile Not Found
Chess.com Profile Not Found
If Chess.com API returns 404:
- Username case: Chess.com usernames are case-insensitive, but check spelling
- Account privacy: Some accounts have restricted public data
- API status: Check Chess.com API status at https://www.chess.com/news/view/published-data-api
