Use this method to remove a chat member from chat. On success, chatMember is returned with the status ‘removed’. Remove user is a temporary way of kicking the user out of a Group or Channel. The user will be able to join chat once again.
Field
Type
Required
Description
method
String
Yes
"removeChatMember"
chat_id
String
Yes
Unique identifier for Group or Channel where the member used to belong.
user_id
String
Yes
Unique identifier for the banned user.

Requests

json
{ "method": "removeChatMember", "chat_id": "4522291356145774", "user_id": "8777444145998741257" }
java
String chatId = "4522291356145774"; String userId = "90089584758972053"; api.removeChatMember(chatId, userId);
javascript
let chatId = "4522291356145774"; let userId = "90089584758972053"; api.removeChatMember(chatId, userId);
python
napi.remove_chat_member("chatId", "userId")

Response

json
{ "chatMember": { "member_since": 1718029851000, "privileges": [ "1", "4611686018427387904" ], "view": 0, "account_type": "email", "chat": { "id": "90090684491334028" }, "type": "Admin", "user": { "id": "90089586341121118" }, "status": "Active", "tags": null }, "method": "chatMember" }