Telegram API¶
Endpoints for controlling the Telegram bot. All endpoints require authentication.
GET /api/admin/telegram/status¶
Get the current Telegram bot status.
Auth: Required
Response: 200 OK
| Field | Description |
|---|---|
running |
Whether the bot polling thread is alive |
name |
Bot name from TELEGRAM_BOT_NAME env var |
started_at |
Start timestamp in Italian timezone (Europe/Rome), or null if not running |
If python-telegram-bot is not installed:
POST /api/admin/telegram/start¶
Start the Telegram bot.
Auth: Required
Response: 200 OK
Possible result values:
| Value | Meaning |
|---|---|
"started" |
Bot started successfully |
"already running" |
Bot was already running |
"no token configured" |
TELEGRAM_BOT_TOKEN is not set |
Error: 500 Internal Server Error if python-telegram-bot is not installed.
POST /api/admin/telegram/stop¶
Stop the Telegram bot.
Auth: Required
Response: 200 OK
Possible result values:
| Value | Meaning |
|---|---|
"stopped" |
Bot stopped |
"not running" |
Bot was not running |