telegram api method · layer 229 · #a2185cab

messages.deleteChatUser

usable by users and bots

Deletes a user from a chat and sends a service message on it.

definition

messages.deleteChatUser#a2185cab flags:# revoke_history:flags.0?true chat_id:long user_id:InputUser = Updates;

parameters

nametypedescription
flags#Flags, see TL conditional fields
revoke_historyflags.0?trueRemove the entire chat history of the specified user in this chat.
chat_idlongChat ID
user_idInputUserUser ID to be deleted

returns

Updates

errors (8)

codeerrordescription
400BUSINESS_CONNECTION_NOT_ALLOWEDThis method was invoked over a business connection using invokeWithBusinessConnection, but either (1) we're a user, and users cannot invoke methods over a business connection; (2) we're a bot, but business mode was disabled in @botfather or (3); we're a bot, but this method cannot be invoked over a business connection.
400CHAT_ADMIN_REQUIREDYou must be an admin in this chat to do this.
400CHAT_ID_INVALIDThe provided chat id is invalid.
400INPUT_USER_DEACTIVATEDThe specified user was deleted.
400PEER_ID_INVALIDThe provided peer id is invalid.
400USER_ID_INVALIDThe provided user ID is invalid.
400USER_NOT_PARTICIPANTYou're not a member of this supergroup/channel.
401AUTH_KEY_UNREGISTEREDThe specified authorization key is not registered in the system (for example, a PFS temporary key has expired).

history

present in layers 2–229 · constructor id changed 3×

idlayers
#c3c5cd232–23
#e0611f1646–122
#c534459a123–132
#a2185cab133–229