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

Inputs

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

Output shape

a single JSON object representing the API result

typically includes an 'ok' flag and may contain a 'result' field; can be empty if the API returns only ok

Examples

Example 1: Leave a supergroup

resource: Chat, operation: Leave Chat, chat_id: @mygroup

Example 2: Leave a channel by username

resource: Chat, operation: Leave Chat, chat_id: @channelusername

Example 3: Leave a private group via ID

resource: Chat, operation: Leave Chat, chat_id: 123456789

Links

Discussion