Verify secrets and environment variables are properly configured. Use before deployment, after adding new services, or when debugging auth issues.
Verify that all secrets are properly configured before deployment or when debugging issues.
| Variable | Description | Where Used |
|---|---|---|
TELEGRAM_BOT_TOKEN |
Telegram Bot API token | Telegram connector |
MONGODB_URI |
MongoDB Atlas connection string | Storage layer |
NVIDIA_API_KEY |
NVIDIA NIM API key | LLM fallback |
APP_SECRET_KEY |
Flask/Quart session secret | Web verification |
VERIFY_TOKEN_SECRET |
Token signing secret | Verification flow |
| Variable | Description | Default |
|---|---|---|
TOGETHER_API_KEY |
Together AI (legacy) | Not used |
DISCORD_BOT_TOKEN |
Discord bot | Skeleton |
WHATSAPP_ACCESS_TOKEN |
WhatsApp Cloud API | Skeleton |
# Check .env exists
ls -la .env
# Verify required vars are set (redacted)
grep -E "^(TELEGRAM_BOT_TOKEN|MONGODB_URI|NVIDIA_API_KEY)=" .env | cut -d= -f1
# Check no secrets in code
grep -rE "(nvapi-|mongodb\+srv://[^\"']+:[^\"']+@)" --include="*.py" src/
TELEGRAM_BOT_TOKENMONGODB_URINVIDIA_API_KEYAPP_SECRET_KEYVERIFY_TOKEN_SECRET.env file exists (copied from env.example)TELEGRAM_BOT_TOKEN is setMONGODB_URI is set and accessibleNVIDIA_API_KEY is set (for LLM fallback)APP_SECRET_KEY is random (not default)VERIFY_TOKEN_SECRET is random (not default).env is in .gitignoreenv.example has placeholder values onlyLLM fallback won't work but bot continues (fail-open).
Fix: Add NVIDIA_API_KEY to Render environment.
MONGODB_URI is correct# Check webhook status
curl "https://api.telegram.org/bot<TOKEN>/getWebhookInfo"
# Set webhook
curl -X POST "https://api.telegram.org/bot<TOKEN>/setWebhook" \
-d "url=https://your-app.onrender.com/hooks/telegram"
When rotating production secrets:
# 1. Generate new secret
NEW_SECRET=$(openssl rand -hex 32)
echo "New secret: $NEW_SECRET"
# 2. Update in Render dashboard
# 3. Trigger redeploy (push to main or manual deploy)
# 4. Verify health check
curl https://your-app.onrender.com/health
env.example - Template for environment variablesdocs/RUNBOOK.md - Full deployment guidesrc/settings.py - Settings loading logic