Added telegram bot WEB App
Build and Publish / Build and Publish Docker Image (push) Successful in 6m0s

This commit is contained in:
Ultradesu
2026-07-01 12:44:53 +03:00
parent 3a4bc23a58
commit 77cde17ef9
10 changed files with 710 additions and 63 deletions
+11 -3
View File
@@ -129,9 +129,12 @@ AMNEZIA_FELLOW_TELEGRAM_BOT_TOKEN=<BOT_TOKEN>
```
In BotFather, create or reuse the same bot and set its Web App URL to
`https://<APP_HOST>/configs`. The bot should reply with the sender's numeric
Telegram ID, and users must open the bot and send `/start` once before
notifications can be delivered.
`https://<APP_HOST>/configs`. This app runs the bot in the same process with
`getUpdates` polling, so do not configure a separate webhook for the same bot.
For browser-based linking, users copy a one-time secret code from the portal and
send it to this bot; the app reads the Telegram sender ID from that message.
Users must open the bot and send `/start` once before notifications can be
delivered.
## API
@@ -140,6 +143,11 @@ The JSON API is session-authenticated:
- `GET /api/me`
- `GET /api/vpn-clients`
- `GET /api/vpn-status`
- `GET /api/telegram-link/status`
- `POST /api/telegram-link/webapp`
- `POST /api/telegram-link/start`
- `POST /api/telegram-link/decline`
- `POST /api/telegram-link/unlink`
- `POST /api/vpn-clients`
- `POST /api/vpn-clients/{id}/enabled`
- `DELETE /api/vpn-clients/{id}`