Telegram Bot icon

Telegram Bot

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

Actions101

Chat → Leave Chat

AI-generated

Summary

Leave a Telegram chat by specifying its unique identifier or username, causing the bot to exit the chat.

Inputs

  • Chat ID (required) — Unique identifier for the target chat or username (@channelusername)

Output shape

a single object containing a boolean indicating success

Returns true on successful chat exit; errors are thrown if the operation fails.

Examples

Example 1: Use this operation to have the bot leave a group or channel it is part of by providing the chat's ID or username.

Set resource to 'Chat', operation to 'Leave Chat', and provide the required 'Chat ID'.

Links

Discussion