Skip to content

getChat

Get detailed information about a chat.

Request

POST /:token/getchat

Parameters

ParameterTypeRequiredDescription
chat_idInteger/StringYesUnique identifier for the target chat or username

Response

Returns a Chat object.

json
{
  "ok": true,
  "result": {
    "id": -1001234567890,
    "type": "supergroup",
    "title": "Tech Discussion Group",
    "username": "tech_group",
    "first_name": null,
    "description": "A group for technical discussions",
    "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": false,
      "can_invite_users": true,
      "can_pin_messages": false
    }
  }
}

Response Fields

FieldTypeDescription
idIntegerUnique identifier for the chat
typeStringType of the chat. Possible values: private, group, supergroup, channel
titleStringTitle of the group or channel. Null for private chats
usernameStringUsername of the chat (if set)
first_nameStringFirst name of the other party in a private chat
descriptionStringDescription of the group or channel
permissionsChatPermissionsDefault member permissions for the group

Error Codes

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