Telegram error 400: Bad Request: bad webhook: IP address N is reserved
Last verified against Telegram Bot API reference
Bad Request: bad webhook: IP address 192.168.1.10 is reservedWhat error 400 means
The webhook host resolved to, or you explicitly passed via ip_address, an address in a reserved range that Telegram will not deliver to. The Bot API server checks the address during webhook verification and reports IP address <ip> is reserved after the bad webhook: prefix; the address in the description is whatever it resolved.
The server source checks IPv4 addresses against the IANA special-purpose registry, including 10.0.0.0/8, 127.0.0.0/8, 172.16.0.0/12, 192.168.0.0/16, 100.64.0.0/10 (carrier-grade NAT) and 169.254.0.0/16 (link-local). Telegram's servers are on the public internet and cannot reach private networks, so the hosted Bot API refuses these up front.
Typical triggers are split-horizon DNS that returns an internal address, an A record left pointing at a load balancer's private IP, or ip_address set to the machine's LAN address. A local Bot API server skips this check.
What it looks like
{"ok":false,"error_code":400,"description":"Bad Request: bad webhook: IP address 192.168.1.10 is reserved"}Why it happens
- The webhook domain's A record points at a private or loopback address.
ip_addresswas set to a LAN or container IP.- Internal DNS returns a private address for the same name used publicly.
- A tunnel or proxy hostname was replaced with an internal address during configuration.
How to fix Telegram error 400
- 1Resolve the hostname from outside your network and confirm it returns a public IPv4 address.
- 2Remove
ip_addressor set it to the public address of your ingress. - 3Update DNS to point at the public load balancer or reverse proxy.
- 4Call setWebhook again and verify with
getWebhookInfo, whoseip_addressfield shows the address in use.
How to stop it recurring
Use public DNS for the webhook hostname and avoid pinning ip_address unless you need it. During development, use an HTTPS tunnel that provides a public address. The webhook checker shows the registered URL and IP, and the webhook debugging guide covers delivery failures after registration.
Official reference: Telegram Bot API reference. See all Telegram error codes or the Telegram limits and quotas.
Related codes
- 400: Bad Request: bad webhook: failed to resolve hostBad Request: bad webhook: failed to resolve host: <detail varies>
- 400: Bad Request: bad webhook: IPv6-only addresses are not allowedBad Request: bad webhook: IPv6-only addresses are not allowed
- 400: Bad Request: invalid webhook URL specifiedBad Request: invalid webhook URL specified
Error 400 - quick answers
What does Telegram error 400 mean?
The webhook host resolved to, or you explicitly passed via ip_address , an address in a reserved range that Telegram will not deliver to. The Bot API server checks the address during webhook verification and reports IP address <ip> is reserved after the bad webhook: prefix; the address in the description is whatever it resolved.
How do I fix Telegram error 400?
1. Resolve the hostname from outside your network and confirm it returns a public IPv4 address. 2. Remove ip_address or set it to the public address of your ingress. 3. Update DNS to point at the public load balancer or reverse proxy. 4. Call setWebhook again and verify with getWebhookInfo , whose ip_address field shows the address in use.
Stop debugging Telegram by hand
Connect the channel through Conferbot: tokens, webhooks and retries are handled, failures show as readable status.