Local Bot API with HTTPS Example (./polling.ts
, ./webhook.ts
)
This example illustrates how to run a bot using a local Bot API server with a reverse proxy and self-signed certificate via Docker.
- Create an application with https://my.telegram.org/apps, and get api id and api hash
- Create a bot with @BotFather, and get the bot token
- Paste your api id, api hash and token into the
docker-compose.yml
file - Run a bot with:
docker-compose up