# Chat

> This object represents a chat

**Category:** Telegram Bot API — Types (A-Z)  
**URL:** https://docs.botlify.cloud/chat  
**Platform:** Botlify Cloud (https://botlify.cloud)  

---

This object represents a chat.

## Fields

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| id | Integer | Always | Unique identifier for this chat. This number may have more than 32 significant bits and some programming languages may have difficulty/silent defects in interpreting it. But it has at most 52 significant bits, so a signed 64-bit integer or double-precision float type are safe for storing this identifier. |
| type | String | Always | Type of the chat, can be either "private", "group", "supergroup" or "channel" |
| title | String | Optional | Title, for supergroups, channels and group chats |
| username | String | Optional | Username, for private chats, supergroups and channels if available |
| first_name | String | Optional | First name of the other party in a private chat |
| last_name | String | Optional | Last name of the other party in a private chat |
| is_forum | True | Optional | True, if the supergroup chat is a forum (has topics enabled) |
| is_direct_messages | True | Optional | True, if the chat is the direct messages chat of a channel |

> [!TIP]
> **Botlify Cloud Runtime**
> Credentials are auto-injected in .env — always load them with getenv(): BOT_TOKEN, ADMIN_CHAT_ID, BOT_USERNAME. Main database: database.db (SQLite, WAL mode). Runtime errors: error.log. Quick test: send to $ADMIN_CHAT_ID. Full details: Runtime Reference.
