setWebhook
Set a webhook URL for receiving Telegram bot updates, enabling real-time event delivery without polling. Configure endpoint, secret token, and allowed updates.
Instructions
Specify a URL to receive incoming updates via webhook. Use deleteWebhook to remove.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| url | Yes | HTTPS URL to send updates to. Use empty string to remove webhook. | |
| ip_address | No | Fixed IP address to send webhook requests instead of resolving URL. | |
| certificate | No | Upload your public key certificate (for self-signed certificates). | |
| secret_token | No | Secret token (1-256 chars) sent in X-Telegram-Bot-Api-Secret-Token header. | |
| allowed_updates | No | List of update types to receive. E.g., ["message", "callback_query"] | |
| max_connections | No | Maximum allowed simultaneous HTTPS connections (1-100). Defaults to 40. | |
| drop_pending_updates | No | Pass True to drop all pending updates. |