Skip to content

toggleChannelInvites

Sahri Riza Umami edited this page Jun 11, 2017 · 5 revisions

Gives or revokes right to invite new members to all current members of the channel.

toggleChannelInvites(channel_id, anyone_can_invite)

Needs creator privileges in the channel.
Available only for supergroups.

Option Description
channel_id Identifier of the channel.
anyone_can_invite New value of anyone_can_invite.

Example

  • Gives right to invite new members to all current members of the supergroup.

    toggleChannelInvites(1234567890, 1)

    Response:

    {
      ID = "Ok"
    }
  • Revokes right to invite new members to all current members of the supergroup.

    toggleChannelInvites(1234567890, 0)

    Response:

    {
      ID = "Ok"
    }

Test script
Frequently Asked Questions
The Functions

Clone this wiki locally