Telegram Bot icon

Telegram Bot

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

Actions101

Chat → Unban Chat Member

AI-generated

Summary

Unban a previously banned member from a specified chat, optionally only if the user is currently banned.

Inputs

  • Chat ID (required) — Unique identifier for the target chat or username (@channelusername).
  • User ID (required) — Unique identifier of the target user to unban.
  • Only If Banned — If set to true, the operation will do nothing if the user is not banned.

Output shape

a single object containing the result of the unban operation from Telegram, typically a boolean indicating success.

The operation returns the Telegram API response's 'result' field or an error. It does not paginate.

Examples

Example 1: Unban a banned user from a group chat unconditionally

Specify the Chat ID and User ID to unban the user from the chat.

Example 2: Unban a user only if they are currently banned

Specify the Chat ID, User ID, and set 'Only If Banned' to true to prevent errors if the user is not banned.

Links

Discussion