Use this method to promote

POST /promoteChatMember

Use this method to promote or demote a user in a supergroup or a channel. The bot must be an administrator in the chat for this to work and must have the appropriate admin rights. Pass False for all boolean parameters to demote a user. Returns True on success.

Body Required

  • chat_id integer | string Required

    Any of:

    Unique identifier for the target chat or username of the target channel (in the format @channelusername)

    Unique identifier for the target chat or username of the target channel (in the format @channelusername)

  • user_id integer Required

    Unique identifier of the target user

  • is_anonymous boolean

    Pass True, if the administrator's presence in the chat is hidden

  • can_change_info boolean

    Pass True, if the administrator can change chat title, photo and other settings

  • can_post_messages boolean

    Pass True, if the administrator can create channel posts, channels only

  • can_edit_messages boolean

    Pass True, if the administrator can edit messages of other users and can pin messages, channels only

  • can_delete_messages boolean

    Pass True, if the administrator can delete messages of other users

  • can_invite_users boolean

    Pass True, if the administrator can invite new users to the chat

  • can_restrict_members boolean

    Pass True, if the administrator can restrict, ban or unban chat members

  • can_pin_messages boolean

    Pass True, if the administrator can pin messages, supergroups only

  • can_promote_members boolean

    Pass True, if the administrator can add new administrators with a subset of their own privileges or demote administrators that he has promoted, directly or indirectly (promoted by administrators that were appointed by him)

Responses

  • default
    Hide response attributes Show response attributes object
    • ok boolean Required

      Default value is false.

    • error_code integer Required
    • description string Required
    • parameters object

      Contains information about why a request was unsuccessful.

      Hide parameters attributes Show parameters attributes object
      • migrate_to_chat_id integer

        Optional. The group has been migrated to a supergroup with the specified identifier. This number may be greater than 32 bits and some programming languages may have difficulty/silent defects in interpreting it. But it is smaller than 52 bits, so a signed 64 bit integer or double-precision float type are safe for storing this identifier.

      • retry_after integer

        Optional. In case of exceeding flood control, the number of seconds left to wait before the request can be repeated

  • 200
    Hide response attributes Show response attributes object
    • ok boolean Required

      Default value is true.

    • result boolean Required

      Default value is true.

POST /promoteChatMember
curl \
 -X POST https://api.telegram.org/bot123456:ABC-DEF1234ghIkl-zyx57W2v1u123ew11/promoteChatMember \
 -H "Content-Type: application/json" \
 -d '{"chat_id":42,"user_id":42,"is_anonymous":true,"can_change_info":true,"can_post_messages":true,"can_edit_messages":true,"can_delete_messages":true,"can_invite_users":true,"can_restrict_members":true,"can_pin_messages":true,"can_promote_members":true}'
Request example
{
  "chat_id": 42,
  "user_id": 42,
  "is_anonymous": true,
  "can_change_info": true,
  "can_post_messages": true,
  "can_edit_messages": true,
  "can_delete_messages": true,
  "can_invite_users": true,
  "can_restrict_members": true,
  "can_pin_messages": true,
  "can_promote_members": true
}
Request examples
{
  "chat_id": 42,
  "user_id": 42,
  "is_anonymous": true,
  "can_change_info": true,
  "can_post_messages": true,
  "can_edit_messages": true,
  "can_delete_messages": true,
  "can_invite_users": true,
  "can_restrict_members": true,
  "can_pin_messages": true,
  "can_promote_members": true
}
Response examples (default)
{
  "ok": false,
  "error_code": 42,
  "description": "string",
  "parameters": {
    "migrate_to_chat_id": 42,
    "retry_after": 42
  }
}
Response examples (default)
{
  "ok": false,
  "error_code": 42,
  "description": "string",
  "parameters": {
    "migrate_to_chat_id": 42,
    "retry_after": 42
  }
}
Response examples (200)
{
  "ok": true,
  "result": true
}
Response examples (200)
{
  "ok": true,
  "result": true
}