Check a Telegram webhook with getWebhookInfo
getWebhookInfo shows whether Telegram can deliver updates to your bot. Here is how to read every field and fix the most common delivery errors.
Do it in a few clicks — no code, no server, right in your browser.
Check my webhookFields of WebhookInfo
| Field | Meaning |
|---|---|
url | Current webhook URL. Empty means the bot uses getUpdates (long polling). |
pending_update_count | Updates waiting for delivery. A growing number means your server doesn't accept them. |
last_error_date, last_error_message | Time (Unix) and text of the most recent delivery error. |
last_synchronization_error_date | Error while synchronizing updates with Telegram datacenters; usually temporary. |
ip_address | IP address Telegram currently sends requests to. |
max_connections | Maximum simultaneous connections. |
allowed_updates | Subscribed update types; absent means the default set. |
has_custom_certificate | Whether a self-signed certificate was uploaded. |
Check with curl
curl "https://api.telegram.org/bot$BOT_TOKEN/getWebhookInfo"Example response:
{
"ok": true,
"result": {
"url": "https://example.com/telegram/webhook",
"has_custom_certificate": false,
"pending_update_count": 12,
"ip_address": "203.0.113.10",
"last_error_date": 1791446400,
"last_error_message": "Wrong response from the webhook: 502 Bad Gateway",
"max_connections": 40,
"allowed_updates": ["message", "callback_query"]
}
}Typical last_error_message values
SSL error {error:...:certificate verify failed}— incomplete certificate chain, expired or self-signed certificate. Install the full chain (fullchain.pem) or upload the self-signed public key.Connection timed out/Read timeout expired— the server is unreachable or answers too slowly. Reply with 200 immediately and process the update in the background.Connection refused— nothing listens on that port, or a firewall blocks Telegram's IP ranges.Failed to resolve host: Name or service not known— DNS problem with your domain.Wrong response from the webhook: 404 Not Found— wrong path in the URL or routing.Wrong response from the webhook: 401 Unauthorized/403 Forbidden— your server rejects the request, often because of a secret token mismatch.Wrong response from the webhook: 500/502/503— your handler crashes or the upstream behind the proxy is down. Check server logs.
After fixing
Refresh the status: last_error_date stays until the next error, so compare its time with the current one. If the queue contains outdated updates, drop them with drop_pending_updates.
Do it in a few clicks — no code, no server, right in your browser.
Check my webhook