Use this method to promote
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
-
Unique identifier of the target user
-
Pass True, if the administrator's presence in the chat is hidden
-
Pass True, if the administrator can change chat title, photo and other settings
-
Pass True, if the administrator can create channel posts, channels only
-
Pass True, if the administrator can edit messages of other users and can pin messages, channels only
-
Pass True, if the administrator can delete messages of other users
-
Pass True, if the administrator can invite new users to the chat
-
Pass True, if the administrator can restrict, ban or unban chat members
-
Pass True, if the administrator can pin messages, supergroups only
-
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)
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}'
{
"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
}
{
"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
}
{
"ok": false,
"error_code": 42,
"description": "string",
"parameters": {
"migrate_to_chat_id": 42,
"retry_after": 42
}
}
{
"ok": false,
"error_code": 42,
"description": "string",
"parameters": {
"migrate_to_chat_id": 42,
"retry_after": 42
}
}
{
"ok": true,
"result": true
}
{
"ok": true,
"result": true
}