Use this method to get a list of administrators in a chat
Use this method to get a list of administrators in a chat. On success, returns an Array of ChatMember objects that contains information about all chat administrators except other bots. If the chat is a group or a supergroup and no administrators were appointed, only the creator will be returned.
POST
/getChatAdministrators
curl \
-X POST https://api.telegram.org/bot123456:ABC-DEF1234ghIkl-zyx57W2v1u123ew11/getChatAdministrators \
-H "Content-Type: application/json" \
-d '{"chat_id":42}'
Request example
{
"chat_id": 42
}
Request examples
{
"chat_id": 42
}
Response examples (default)
{
"ok": false,
"error_code": 42,
"description": "string",
"parameters": {
"migrate_to_chat_id": 42,
"retry_after": 42
}
}
Response examples (default)
{
"ok": false,
"error_code": 42,
"description": "string",
"parameters": {
"migrate_to_chat_id": 42,
"retry_after": 42
}
}
Response examples (200)
{
"ok": true,
"result": [
{
"user": {
"id": 42,
"is_bot": true,
"first_name": "string",
"last_name": "string",
"username": "string",
"language_code": "string",
"can_join_groups": true,
"can_read_all_group_messages": true,
"supports_inline_queries": true
},
"status": "creator",
"custom_title": "string",
"is_anonymous": true,
"can_be_edited": true,
"can_post_messages": true,
"can_edit_messages": true,
"can_delete_messages": true,
"can_restrict_members": true,
"can_promote_members": true,
"can_change_info": true,
"can_invite_users": true,
"can_pin_messages": true,
"is_member": true,
"can_send_messages": true,
"can_send_media_messages": true,
"can_send_polls": true,
"can_send_other_messages": true,
"can_add_web_page_previews": true,
"until_date": 42
}
]
}
Response examples (200)
{
"ok": true,
"result": [
{
"user": {
"id": 42,
"is_bot": true,
"first_name": "string",
"last_name": "string",
"username": "string",
"language_code": "string",
"can_join_groups": true,
"can_read_all_group_messages": true,
"supports_inline_queries": true
},
"status": "creator",
"custom_title": "string",
"is_anonymous": true,
"can_be_edited": true,
"can_post_messages": true,
"can_edit_messages": true,
"can_delete_messages": true,
"can_restrict_members": true,
"can_promote_members": true,
"can_change_info": true,
"can_invite_users": true,
"can_pin_messages": true,
"is_member": true,
"can_send_messages": true,
"can_send_media_messages": true,
"can_send_polls": true,
"can_send_other_messages": true,
"can_add_web_page_previews": true,
"until_date": 42
}
]
}