Skip to content

getChatMember

Get information about a specific member in a chat.

Request

POST /:token/getchatmember

Parameters

ParameterTypeRequiredDescription
chat_idInteger/StringYesUnique identifier for the target chat or username
user_idIntegerYesUnique identifier of the target user

Response

Returns a ChatMember object.

json
{
  "ok": true,
  "result": {
    "user": {
      "id": 123456789,
      "is_bot": false,
      "first_name": "John",
      "username": "johndoe"
    },
    "status": "administrator",
    "custom_title": "Tech Lead",
    "is_anonymous": false,
    "can_manage_chat": true,
    "can_post_messages": true,
    "can_edit_messages": true,
    "can_delete_messages": true,
    "can_manage_video_chats": true,
    "can_restrict_members": true,
    "can_promote_members": false,
    "can_change_info": true,
    "can_invite_users": true,
    "can_pin_messages": true
  }
}

Response Fields

FieldTypeDescription
userUserUser information object of the member
statusStringMember status. Possible values: creator, administrator, member, restricted, left, kicked
custom_titleStringCustom title of the administrator
is_anonymousBooleanWhether the administrator is anonymous
can_manage_chatBooleanWhether the member can manage the chat
can_post_messagesBooleanWhether the member can post messages (channels only)
can_edit_messagesBooleanWhether the member can edit messages (channels only)
can_delete_messagesBooleanWhether the member can delete messages
can_manage_video_chatsBooleanWhether the member can manage video chats
can_restrict_membersBooleanWhether the member can restrict other members
can_promote_membersBooleanWhether the member can promote other members to administrators
can_change_infoBooleanWhether the member can change chat information
can_invite_usersBooleanWhether the member can invite users
can_pin_messagesBooleanWhether the member can pin messages

Error Codes

CodeDescription
400Bad request parameters, e.g. missing chat_id or user_id
401Invalid or expired token
403Bot is not a member of this chat and has no access