POST /setChatPermissions

Use this method to set default chat permissions for all members. The bot must be an administrator in the group or a supergroup for this to work and must have the can_restrict_members admin rights. Returns True on success.

Servers

Request headers

Name Type Required Description
Content-Type String Yes The media type of the request body.

Default value: "application/json"

Request body fields

Name Type Required Description
chat_id Yes

Unique identifier for the target chat or username of the target supergroup (in the format @supergroupusername)

permissions Object Yes

Describes actions that a non-administrator user is allowed to take in a chat.

permissions.can_invite_users Boolean No

Optional. True, if the user is allowed to invite new users to the chat

permissions.can_add_web_page_previews Boolean No

Optional. True, if the user is allowed to add web page previews to their messages, implies can_send_media_messages

permissions.can_send_other_messages Boolean No

Optional. True, if the user is allowed to send animations, games, stickers and use inline bots, implies can_send_media_messages

permissions.can_send_messages Boolean No

Optional. True, if the user is allowed to send text messages, contacts, locations and venues

permissions.can_send_polls Boolean No

Optional. True, if the user is allowed to send polls, implies can_send_messages

permissions.can_change_info Boolean No

Optional. True, if the user is allowed to change the chat title, photo and other settings. Ignored in public supergroups

permissions.can_send_media_messages Boolean No

Optional. True, if the user is allowed to send audios, documents, photos, videos, video notes and voice notes, implies can_send_messages

permissions.can_pin_messages Boolean No

Optional. True, if the user is allowed to pin messages. Ignored in public supergroups

How to start integrating

  1. Add HTTP Task to your workflow definition.
  2. Search for the API you want to integrate with and click on the name.
    • This loads the API reference documentation and prepares the Http request settings.
  3. Click Test request to test run your request to the API and see the API's response.