Upgrade to Bot Account
Bot accounts must be used with API access tokens and cannot play using the web interface.
POST /api/bot/account/upgrade
Upgrade your account to a bot account. Once upgraded, the account can:- Play games using the Bot API
- Connect to the event stream for incoming challenges
- Make moves programmatically via API
Authentication
Requires OAuth token withbot:play scope.
Request
Response
Success status
What Happens on Upgrade
- Tournament Withdrawal: Automatically withdraws from all active tournaments
- Swiss Withdrawal: Withdraws from all Swiss tournaments
- Streamer Status: Removes streamer status if present
- Team Membership: Existing team memberships remain, but cannot join new teams
- Preferences: Bot-specific preferences are applied
- User Cache: Light user cache is invalidated
Get Bot Account Info
GET /api/account
Get the profile information for the authenticated bot account.Avoid polling this endpoint. Use GET /api/stream/event instead to receive real-time updates.
Authentication
Requires OAuth token with any scope.Request
Response
User ID (lowercase username)
Display username
User title (will be “BOT” for bot accounts)
Whether the user is currently online
Performance ratings for each game variant and time control
Account creation timestamp (milliseconds since epoch)
User profile information
Best Practices
Bot Account Guidelines
- Fair Play: Ensure your bot follows Lichess Terms of Service
- Engine Attribution: Clearly state which engine your bot uses in the profile
- Rate Limiting: Respect API rate limits to avoid being throttled
- Connection Management: Use persistent connections for event streams
- Graceful Shutdown: Handle disconnections and reconnect appropriately
Error Handling
Always check response status codes:200- Success400- Bad request (e.g., managed account cannot be bot)401- Unauthorized (invalid or missing token)429- Too many requests (rate limited)
Example: Complete Bot Setup
See Also
- Playing Games - Connect to games and make moves
- Challenges - Handle incoming challenges
- OAuth - Authentication and scopes

