Skip to content
Software capabilities
Telegram Bot API

Inspect a Telegram bot webhook

Call getWebhookInfo to see whether your bot has a webhook, how many updates are waiting, and the most recent delivery error. Use getMe to confirm which bot your token belongs to.

Documentation reviewed · 2 methods with sources

Ways to do it

  1. API: getWebhookInfo
  2. API: getMe
API

getWebhookInfo

Read the bot's webhook URL, pending update count, and most recent synchronization error.

Read source: Telegram Bot API getWebhookInfo
Requirements
A Telegram bot token and HTTPS access to the Bot API.
Limitations
The response reports the latest webhook error, not a complete delivery log. An empty URL means the bot is using polling or has no webhook.

Example shell

curl --fail "https://api.telegram.org/bot$TELEGRAM_BOT_TOKEN/getWebhookInfo"
API

getMe

Verify the bot token and read the bot identity before checking webhook status.

Read source: Telegram Bot API getMe
Requirements
A Telegram bot token and HTTPS access to the Bot API.
Limitations
getMe returns identity and capabilities. Read pending update counts and webhook errors with getWebhookInfo.

Example shell

curl --fail "https://api.telegram.org/bot$TELEGRAM_BOT_TOKEN/getMe"