telegram api method · layer 229 · #a2185cab
messages.deleteChatUser
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
| name | type | description |
|---|---|---|
flags | # | Flags, see TL conditional fields |
revoke_history | true | Remove the entire chat history of the specified user in this chat. |
chat_id | long | Chat ID |
user_id | InputUser | User ID to be deleted |
returns
errors (8)
| code | error | description |
|---|---|---|
| 400 | BUSINESS_CONNECTION_NOT_ALLOWED | This 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. |
| 400 | CHAT_ADMIN_REQUIRED | You must be an admin in this chat to do this. |
| 400 | CHAT_ID_INVALID | The provided chat id is invalid. |
| 400 | INPUT_USER_DEACTIVATED | The specified user was deleted. |
| 400 | PEER_ID_INVALID | The provided peer id is invalid. |
| 400 | USER_ID_INVALID | The provided user ID is invalid. |
| 400 | USER_NOT_PARTICIPANT | You're not a member of this supergroup/channel. |
| 401 | AUTH_KEY_UNREGISTERED | The 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×
| id | layers |
|---|---|
| #c3c5cd23 | 2–23 |
| #e0611f16 | 46–122 |
| #c534459a | 123–132 |
| #a2185cab | 133–229 |