Use this method to get up to date information about the chat
Use this method to get up to date information about the chat (current name of the user for one-on-one conversations, current username of a user, group or channel, etc.). Returns a Chat object on success.
POST
/getChat
curl \
-X POST https://api.telegram.org/bot123456:ABC-DEF1234ghIkl-zyx57W2v1u123ew11/getChat \
-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": {
"id": 42,
"type": "private",
"title": "string",
"username": "string",
"first_name": "string",
"last_name": "string",
"photo": {
"small_file_id": "string",
"small_file_unique_id": "string",
"big_file_id": "string",
"big_file_unique_id": "string"
},
"bio": "string",
"description": "string",
"invite_link": "string",
"pinned_message": {},
"permissions": {
"can_send_messages": true,
"can_send_media_messages": true,
"can_send_polls": true,
"can_send_other_messages": true,
"can_add_web_page_previews": true,
"can_change_info": true,
"can_invite_users": true,
"can_pin_messages": true
},
"slow_mode_delay": 42,
"sticker_set_name": "string",
"can_set_sticker_set": true,
"linked_chat_id": 42,
"location": {
"location": {
"longitude": 42.0,
"latitude": 42.0,
"horizontal_accuracy": 42.0,
"live_period": 42,
"heading": 42,
"proximity_alert_radius": 42
},
"address": "string"
}
}
}
Response examples (200)
{
"ok": true,
"result": {
"id": 42,
"type": "private",
"title": "string",
"username": "string",
"first_name": "string",
"last_name": "string",
"photo": {
"small_file_id": "string",
"small_file_unique_id": "string",
"big_file_id": "string",
"big_file_unique_id": "string"
},
"bio": "string",
"description": "string",
"invite_link": "string",
"pinned_message": {},
"permissions": {
"can_send_messages": true,
"can_send_media_messages": true,
"can_send_polls": true,
"can_send_other_messages": true,
"can_add_web_page_previews": true,
"can_change_info": true,
"can_invite_users": true,
"can_pin_messages": true
},
"slow_mode_delay": 42,
"sticker_set_name": "string",
"can_set_sticker_set": true,
"linked_chat_id": 42,
"location": {
"location": {
"longitude": 42.0,
"latitude": 42.0,
"horizontal_accuracy": 42.0,
"live_period": 42,
"heading": 42,
"proximity_alert_radius": 42
},
"address": "string"
}
}
}