> ## Documentation Index
> Fetch the complete documentation index at: https://docs.openbunny.ai/llms.txt
> Use this file to discover all available pages before exploring further.

# Telegram

> Connect to Telegram using your personal account via the MTProto protocol.

OpenBunny connects to Telegram using GramJS, which uses the MTProto protocol to connect with your personal Telegram account.

## Prerequisites

* A Telegram account
* API credentials from [my.telegram.org](https://my.telegram.org)

## Setup

<Steps>
  ### Get API credentials

  1. Go to [my.telegram.org](https://my.telegram.org) and sign in
  2. Go to **API development tools**
  3. Create a new application
  4. Copy the **API ID** and **API hash**

  ### Configure environment

  ```bash .env theme={null}
  TELEGRAM_API_ID=12345678
  TELEGRAM_API_HASH=your-api-hash
  ```

  ### Authenticate

  Run the setup wizard and select Telegram. You'll be prompted to enter a verification code sent to your Telegram app.

  ```bash theme={null}
  npm run setup
  ```
</Steps>

## How it works

The service uses GramJS to maintain a persistent connection to Telegram's MTProto servers. Messages from personal chats and groups are received in real time and processed through the standard pipeline.

Session credentials are stored locally and persist across restarts.
