Use this method to unban a chat member from accessing chat. On success, chatMember is returned with the status Active. If Unban is removed from the blacklist, the user will be able to join Chat once again.
Field
Type
Required
Description
method
String
Yes
"unbanChatMember"
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": "unbanChatMember", "chat_id": "48774123855526985", "user_id": "97841144102365478" }
java
String chatId = "4522291356145774"; String userId = "90089584758972053"; api.unbanChatMember(chatId, userId);
javascript
let chatId = "4522291356145774"; let userId = "90089584758972053"; api.unbanChatMember(chatId, userId);
python
napi.unban_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" }