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

# Telegram Adapter

> Deploy your bot to Telegram

## Setup

### 1. Create Telegram Bot

**1. Find BotFather**

Open Telegram and search for @BotFather

**2. Create bot**

Send `/newbot` and follow instructions

**3. Copy token**

Copy the API token provided

### 2. Install

```bash theme={null}
npm install @boostgpt/router
```

### 3. Configure

```bash .env theme={null}
TELEGRAM_TOKEN=your_telegram_token
```

## Usage

```javascript theme={null}
import { Router, TelegramAdapter } from '@boostgpt/router';

const router = new Router({
  apiKey: process.env.BOOSTGPT_API_KEY,
  projectId: process.env.BOOSTGPT_PROJECT_ID,
  adapters: [
    new TelegramAdapter({
      telegramToken: process.env.TELEGRAM_TOKEN,
      welcomeMessage: 'Hi {name}! 👋'
    })
  ]
});

await router.start();
```

## Options

**telegramToken** `string` *required*

Telegram bot token

**welcomeMessage** `string`

Message sent on /start (use {name} for user's name)


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.