Connect ESPN
Configure your ESPN Fantasy Basketball credentials
ESPN Authentication
Adam uses your ESPN session cookies to access your private league data. Your credentials are never logged or stored insecurely.
How to get your ESPN cookies:
- Log in to ESPN Fantasy
Go to fantasy.espn.com/basketball and sign in - Open Developer Tools
Press F12 or right-click → Inspect → Application tab - Find Cookies
In the sidebar: Storage → Cookies → https://fantasy.espn.com - Copy these values:
espn_s2- A long string (your session cookie)SWID- A GUID in braces like{XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX} - Get your League ID
From your league URL: fantasy.espn.com/basketball/league?leagueId=12345678
Environment Variables
Add these to your Vercel project settings or .env.local file:
# ESPN Fantasy (Required)
ESPN_S2=your_espn_s2_cookie_value
ESPN_SWID={XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX}
ESPN_LEAGUE_ID=12345678
ESPN_SEASON=2026
ESPN_MY_TEAM_ID=1
# Telegram Notifications (Optional)
TELEGRAM_BOT_TOKEN=your_bot_token
TELEGRAM_CHAT_ID=your_chat_id
# Vercel KV (Auto-configured on Vercel)
KV_URL=your_kv_url
KV_REST_API_URL=your_kv_rest_api_url
KV_REST_API_TOKEN=your_kv_rest_api_token
KV_REST_API_READ_ONLY_TOKEN=your_read_only_token
# Optional
APP_BASE_URL=https://your-app.vercel.app
CRON_SECRET=your_cron_secretTelegram Notifications
How to set up Telegram alerts:
- Create a Telegram Bot
Message @BotFather on Telegram and send/newbot - Save the Bot Token
BotFather will give you a token like123456789:ABCdefGHIjklMNOpqrSTUvwxYZ - Get Your Chat ID
Start a chat with your bot, then visit:https://api.telegram.org/bot<YOUR_TOKEN>/getUpdates
Find your chat ID in the response - Add to Environment Variables
Set TELEGRAM_BOT_TOKEN and TELEGRAM_CHAT_ID
Vercel Deployment
- Fork or Clone the Repository
- Create a Vercel KV Store
In your Vercel project: Storage → Create Database → KV - Add Environment Variables
Project Settings → Environment Variables → Add all variables above - Deploy
Push to your repository or deploy via Vercel CLI - Verify Cron Job
Check Vercel Dashboard → Settings → Cron Jobs