Telegram Bot icon

Telegram Bot

Interact with the Telegram Bot API – send messages, manage chats, handle payments, and more

Actions101

Webhook → Set Webhook

AI-generated

Summary

Set the webhook URL for the Telegram bot to receive updates via HTTPS POST requests.

Inputs

  • Webhook URL (required) — HTTPS URL to which Telegram will send updates.
  • Additional Fields — Optional parameters including fixed IP address for webhook requests, maximum allowed simultaneous HTTPS connections (1-100), JSON array of update types to receive, option to drop all pending updates, and a secret token for 'X-Telegram-Bot-Api-Secret-Token' header.

Output shape

a single JSON object containing the Telegram API response indicating success or failure of the webhook setup.

The response typically contains a boolean 'result' field indicating if setting the webhook was successful. Additional response fields depend on the Telegram API.

Examples

Example 1: Set webhook with URL only

Provide the HTTPS URL for webhook_url parameter and leave additional fields empty or default.

Example 2: Set webhook with custom max connections and secret token

Specify webhook_url along with max_connections and secret_token in additional fields to configure webhook with limits and secure secret token.

Links

Discussion