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

# Get Credentials

> Step-by-step instructions for obtaining Telegram bot credentials.

## Authentication Method

* **`bot_token`** - Telegram bot token

## Bot Token Setup

### Step 1: Create a Telegram Bot

1. Open Telegram and search for **@BotFather**
2. Start a chat and send `/newbot`
3. Follow the prompts to choose a name and username for your bot
4. BotFather will send you a token like `123456789:ABCdef...`
5. Copy and store it securely

**Storing Credentials:**

```bash theme={null}
pnpm corsair setup --plugin=telegram bot_token=your-bot-token
```

## Webhook Setup (Optional)

Telegram webhooks use a secret token for verification.

1. Generate a random secret string
2. Store it as the webhook signature:

```bash theme={null}
pnpm corsair setup --plugin=telegram webhook_signature=your-secret-token
```

3. Register the webhook URL with Telegram:

```ts theme={null}
await corsair.telegram.api.webhook.setWebhook({
    url: "https://yourapp.com/webhooks/telegram",
    secret_token: "your-secret-token",
});
```

## Required Credentials Summary

| Credential     | Required For         | Where to Find       |
| -------------- | -------------------- | ------------------- |
| Bot Token      | All API calls        | Telegram @BotFather |
| Webhook Secret | Webhook verification | Self-generated      |

For general information about how Corsair handles authentication, see [Authentication](/concepts/auth).
