Tool

Restrict chat member

The telegram_bot_api-restrict-chat-member tool enables administrators to restrict user permissions within supergroups on Telegram. This powerful method allows precise control over what members can post, helping maintain group order and enforce rules.

telegram_bot_api

Features

  • Restrict a user in any Telegram supergroup by specifying chat and user ID.
  • Set timed restrictions with an 'until_date' Unix timestamp for automatic lifting.
  • Control sending permissions including text, media, animations, and inline bots.
  • Option to enable or disable web page previews in user messages.
  • Supports fine-grained permission settings to customize user capabilities individually.

Benefits

  • Maintains discipline and order by controlling disruptive members.
  • Automates temporary restrictions to ease moderation workload.
  • Enhances group security by limiting spam and inappropriate content.
  • Improves user experience by customizing member permissions to fit group needs.
  • Simplifies Telegram group management with an easy-to-use API integration.

Description

Use this method to restrict a user in a supergroup. See the docs for more information

Parameters

7 parameters

NameTypeDescription
chatIdrequiredstring

Enter the unique identifier for the target chat (e.g. 1035597319) or username of the target public chat (in the format @channelusername or @supergroupusername). For example, if the group's public link is t.me/mygroup, the username is @mygroup.

userIdstring

Enter the unique identifier of the target user.

until_datestring

Enter the date when the restrictions will be lifted for the user, in unix time (e.g. 1567780450).

can_send_messagesboolean

Pass True, if the user can send text messages, contacts, locations and venues.

can_send_media_messagesboolean

Pass True, if the user can send audios, documents, photos, videos, video notes and voice notes, implies can_send_messages.

can_send_other_messagesboolean

Pass True, if the user can send animations, games, stickers and use inline bots, implies can_send_media_messages.

can_add_web_page_previewsboolean

Pass True, if the user may add web page previews to their messages, implies can_send_media_messages.

Try Needle today

Streamline AI productivity at your company today

Join thousands of people who have transformed their workflows.

Agentic workflowsAutomations, meet AI agents
AI SearchAll your data, searchable
Chat widgetsDrop-in widget for your website
Developer APIMake your app talk to Needle
    Needle LogoNeedle
    Like many websites, we use cookies to enhance your experience, analyze site traffic and deliver personalized content while you are here. By clicking "Accept", you are giving us your consent to use cookies in this way. Read our more on our cookie policy .