mirror of
https://github.com/aiogram/aiogram.git
synced 2026-04-08 16:37:47 +00:00
Added briefly explanation how the Webhook works
This commit is contained in:
parent
2732dc279d
commit
757164da3e
1 changed files with 5 additions and 0 deletions
|
|
@ -11,11 +11,16 @@ from aiogram.methods import SendMessage
|
|||
|
||||
TELEGRAM_TOKEN = getenv("TELEGRAM_TOKEN")
|
||||
|
||||
# Webhook is a way to receive updates from Telegram servers
|
||||
# Telegram sends POST request to the WEBHOOK_URL with JSON body.
|
||||
# It means that requests to WEBHOOK_URL must be handled by webserver.
|
||||
# Webhook settings
|
||||
WEBHOOK_HOST = getenv("WEBHOOK_HOST", "https://your.domain")
|
||||
WEBHOOK_PATH = getenv("WEBHOOK_PATH", "/path/to/api")
|
||||
WEBHOOK_URL = f"{WEBHOOK_HOST}{WEBHOOK_PATH}"
|
||||
|
||||
# You have to guarantee that requests to WEBHOOK_URL are handled by aiohttp webserver.
|
||||
# More information about Webhook: https://core.telegram.org/bots/webhooks
|
||||
# Webserver settings
|
||||
WEBAPP_HOST = getenv("WEBAPP_HOST", "localhost") # or ip
|
||||
WEBAPP_PORT = getenv("WEBAPP_PORT", 3001)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue