Sign inSign up

gegedesembri/telegram-bot-api

By gegedesembri

Updated 12 months ago

Telegram Bot API (Unofficial)

Image
0

3.9K

gegedesembri/telegram-bot-api repository overview

Telegram Bot API (Unofficial)

Get Telegram API ID and HASH

https://my.telegram.org/apps

Docker Compose Example

version: '3.7'

services:
  server:
    image: gegedesembri/telegram-bot-api:latest
    environment:
      TELEGRAM_API_ID: "api_id"
      TELEGRAM_API_HASH: "api_hash"
    volumes:
      - telegram-bot-api-data:/var/lib/telegram-bot-api
    ports:
      - "8081:8081"
    restart: always

volumes:
  telegram-bot-api-data:

Replace api_id and api_hash

Docker Run Commandline

docker run -d \
    --name="telegram-bot-api" \
    --env="TELEGRAM_API_ID=api_id" \
    --env="TELEGRAM_API_HASH=api_hash" \
    --volume="telegram-bot-api-data:/var/lib/telegram-bot-api" \
    --publish="8081:8081" \
    --restart=always \
    gegedesembri/telegram-bot-api:latest

Replace api_id and api_hash

Set Webhook

Set Webhook URL

https://<URL_BOTSERVER>/bot<BOT_TOKEN>/setWebhook?url=https://<URL_BOT>/

Replace :

  • <URL_BOT> with your bot URL
  • <URL_BOTSERVER> with your bot server URL
  • <BOT_TOKEN> with your bot token from botFather

After replace, access full URL with Browser

{
    "ok":true,
    "result":true,
    "description":"Webhook is already set"
}

Tag summary

Content type

Image

Digest

sha256:5e6233724

Size

15.8 MB

Last updated

over 1 year ago

docker pull gegedesembri/telegram-bot-api