Telegram Bot API · error code

Telegram error 400: Bad Request: bad webhook: IPv6-only addresses are not allowed

ConfigurationHTTP 400400 Bad Request: webhook registration

Last verified against Telegram Bot API reference

What Telegram returns
Bad Request: bad webhook: IPv6-only addresses are not allowed
Fix it faster: Telegram webhook checkerRead getWebhookInfo, see the last delivery error explained, and reset the webhook from your browser. Free, runs in your browser.

What error 400 means

The webhook host resolved only to an IPv6 address, or you passed an IPv6 address as ip_address. The hosted Bot API delivers webhooks over IPv4 only. Telegram's webhook guide states the requirement in its short version: your server must support IPv4, and IPv6 is currently not supported for webhooks. The Bot API server enforces it during setWebhook verification and prefixes the reason with bad webhook:.

Hosts that are IPv6-native are the usual source: some VPS plans, container platforms and edge networks give you an AAAA record by default and an A record only on request. Everything works from your own dual-stack laptop, which hides the problem until Telegram tries to connect.

A self-hosted local Bot API server does not apply this restriction, but on the hosted API you need an IPv4 address that accepts connections on one of the allowed ports.

What it looks like

{"ok":false,"error_code":400,"description":"Bad Request: bad webhook: IPv6-only addresses are not allowed"}

Why it happens

  • The domain has an AAAA record but no A record.
  • ip_address was set to an IPv6 address.
  • The hosting plan does not include a public IPv4 address.

How to fix Telegram error 400

  1. 1Add an A record for the webhook hostname pointing at a public IPv4 address.
  2. 2Put an IPv4-capable reverse proxy or CDN in front of an IPv6-only origin.
  3. 3Remove an IPv6 ip_address value from the setWebhook call.
  4. 4Re-register and confirm with getWebhookInfo.

How to stop it recurring

Check that the webhook hostname has an A record as part of infrastructure provisioning, not after deploy. If you move hosts or change CDN settings, re-test DNS for both record types and re-run setWebhook, since a host that silently dropped its IPv4 record will fail the next registration. Port and protocol requirements are collected under webhook limits.

Official reference: Telegram Bot API reference. See all Telegram error codes or the Telegram limits and quotas.

Related codes

Error 400 - quick answers

What does Telegram error 400 mean?

The webhook host resolved only to an IPv6 address, or you passed an IPv6 address as ip_address . The hosted Bot API delivers webhooks over IPv4 only. Telegram's webhook guide states the requirement in its short version: your server must support IPv4, and IPv6 is currently not supported for webhooks. The Bot API server enforces it during setWebhook verification and prefixes the reason with bad webhook: .

How do I fix Telegram error 400?

1. Add an A record for the webhook hostname pointing at a public IPv4 address. 2. Put an IPv4-capable reverse proxy or CDN in front of an IPv6-only origin. 3. Remove an IPv6 ip_address value from the setWebhook call. 4. Re-register and confirm with getWebhookInfo .

Stop debugging Telegram by hand

Connect the channel through Conferbot: tokens, webhooks and retries are handled, failures show as readable status.