Actions101
- Bot Actions
- Chat Actions
- Get Chat
- Get Chat Administrators
- Get Chat Member Count
- Get Chat Member
- Ban Chat Member
- Unban Chat Member
- Restrict Chat Member
- Promote Chat Member
- Set Chat Administrator Custom Title
- Set Chat Permissions
- Export Chat Invite Link
- Create Chat Invite Link
- Edit Chat Invite Link
- Revoke Chat Invite Link
- Approve Chat Join Request
- Decline Chat Join Request
- Set Chat Photo
- Delete Chat Photo
- Set Chat Title
- Set Chat Description
- Pin Chat Message
- Unpin Chat Message
- Unpin All Chat Messages
- Leave Chat
- Set Chat Menu Button
- Get Chat Menu Button
- Set Chat Sticker Set
- Delete Chat Sticker Set
- File Actions
- Forum Actions
- Game Actions
- Inline Actions
- Message Actions
- Send Message
- Forward Message
- Copy Message
- Send Photo
- Send Audio
- Send Document
- Send Video
- Send Animation
- Send Voice
- Send Video Note
- Send Media Group
- Send Location
- Send Venue
- Send Contact
- Send Poll
- Send Dice
- Send Chat Action
- Edit Message Text
- Edit Message Caption
- Edit Message Media
- Edit Message Reply Markup
- Edit Message Live Location
- Stop Message Live Location
- Stop Poll
- Delete Message
- Delete Messages
- Payment Actions
- Sticker Actions
- Update Actions
- Webhook Actions
Chat → Ban Chat Member
AI-generatedSummary
Ban a specific user from a Telegram chat, optionally setting a ban expiration and removing the user's messages from the chat.
Inputs
- Chat ID (required) — Unique identifier for the target chat or username (@channelusername).
- User ID (required) — Unique identifier of the user to ban from the chat.
- Until Date — Unix timestamp when the user will be unbanned (0 means the ban is permanent).
- Revoke Messages — Boolean flag indicating whether to delete all messages from the chat for the banned user.
Output shape
a single JSON object representing the Telegram API response of the banChatMember call
The operation returns the API's result object directly as JSON. It may include information about success or failure of the ban action.
Examples
Example 1: Ban a user from a chat indefinitely and remove their messages
Set the Chat ID and User ID, leave Until Date as 0 (default), set Revoke Messages to true.