Telegram:
- /start <contact_id> Deep-Link Handler: verknüpft Kontakt automatisch mit chat_id
- QR-Code Endpunkt GET /api/v1/contacts/{id}/telegram-qr (PNG)
- TUI: Taste T öffnet QR-Code im Browser (HTML mit eingebettetem PNG)
- config.py + .env.example: TELEGRAM_BOT_USERNAME=mcm_bot
- qrcode[pil] zu requirements.txt hinzugefügt
WhatsApp:
- receiveTimeout 5→3s, HTTP-Timeout 8s → verhindert Polling-Overlap
39 lines
1.8 KiB
Plaintext
39 lines
1.8 KiB
Plaintext
# MCM – MultiCustomerMessenger Konfiguration
|
||
# Datei kopieren: cp .env.example .env
|
||
|
||
# ── API ────────────────────────────────────────────────────
|
||
API_KEY=changeme-secret-key
|
||
HOST=0.0.0.0
|
||
PORT=8000
|
||
DEBUG=false
|
||
|
||
# ── Telegram ───────────────────────────────────────────────
|
||
TELEGRAM_TOKEN=
|
||
# Bot-Username ohne @ (für QR-Code / Invite-Links)
|
||
TELEGRAM_BOT_USERNAME=mcm_bot
|
||
|
||
# ── WhatsApp (Green API) ───────────────────────────────────
|
||
# Konto anlegen unter: https://console.green-api.com
|
||
WHATSAPP_ID_INSTANCE=
|
||
WHATSAPP_API_TOKEN=
|
||
|
||
# ── SMS / USB-Modem ────────────────────────────────────────
|
||
SMS_PORT=/dev/ttyUSB0
|
||
SMS_BAUD_RATE=115200
|
||
SMS_ENABLED=false
|
||
|
||
# ── Datenbank ──────────────────────────────────────────────
|
||
DATABASE_URL=sqlite:///./mcm.db
|
||
|
||
# ── TUI Web-Modus (textual serve) ──────────────────────────
|
||
# Starten: python serve_tui.py --host 0.0.0.0 --port $WEB_PORT
|
||
WEB_PORT=8001
|
||
|
||
# ── Benutzer-Authentifizierung ──────────────────────────────────────────────
|
||
# secret_key: mindestens 32 Zeichen, zufällig generieren (z.B. openssl rand -hex 32)
|
||
SECRET_KEY=change-this-secret-key-min-32-chars!!
|
||
TOKEN_EXPIRE_HOURS=24
|
||
# Standard-Admin-Benutzer (wird beim ersten Start angelegt)
|
||
DEFAULT_ADMIN_USER=admin
|
||
DEFAULT_ADMIN_PASSWORD=admin
|