Developers » API methods » Messages » messages.removeChatUser
Allows the current user to leave a chat or, if the current user started the chat, allows the user to remove another user from the chat.COMMENT: (1 of 2) The English translation was not clear at all, so we tried to simplify it. Is it still technically accurate?
This method can be called with a user token received in Standalone-app via Implicit Flow. Access rights required: messages.
This method can be called with a community token. Access rights required: messages.
chat_idChat ID.
positive number, required parameter, maximum value 100000000
user_idID of the user to be removed from the chat.
int (number)
member_idID of the member to be removed. For communities: -group_id.
int (number), accessible for versions from 5.81
Returns 1.

925You are not admin of this chat
935User not found in chat
936Contact not found
945Chat was disabled
946Chat not supported
Global errors can occur while running. See their descriptions on this page.
Version historyShow all
messages.removeChatUser method returns new error "935: User not found in chat".
Affects methods messages.removeChatUser
messages.removeChatUser method takes new member_id (integer) parameter. New Bots Longpoll and Callback API event has been added.