Skip to content

setSupergroupUsername

Sahri Riza Umami edited this page Jun 23, 2018 · 1 revision

Changes the username of a supergroup or channel, requires creator privileges in the supergroup or channel.

setSupergroupUsername(supergroup_id, username, callback, data)
Field Type Description
supergroup_id int32 Identifier of the supergroup or channel.
username string New value of the username. Use an empty string to remove the username.

Example

  • Changes the username of supergroup or channel 1234567890 to "justfortest".

    setSupergroupUsername(1234567890, 'justfortest')

    Response:

    {
      ["@type"] = "ok"
    }
  • Removes the username of supergroup or channel 1234567890.

    setSupergroupUsername(1234567890, '')

    Response:

    {
      ["@type"] = "ok"
    }

Frequently Asked Questions
The Functions

Clone this wiki locally