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

# Channel Configuration

> Configure communication channels for NullClaw

NullClaw supports 17 messaging channels including Telegram, Discord, Slack, and more. Each channel has specific configuration requirements and access controls.

## Channel Structure

Channels are configured in the `channels` section:

```json theme={null}
{
  "channels": {
    "cli": true,
    "telegram": {
      "accounts": {
        "main": {
          "bot_token": "YOUR_TELEGRAM_BOT_TOKEN",
          "allow_from": ["123456789"]
        }
      }
    },
    "discord": {
      "accounts": {
        "main": {
          "token": "YOUR_DISCORD_BOT_TOKEN",
          "allow_from": ["user_id_1", "user_id_2"]
        }
      }
    }
  }
}
```

## CLI Channel

<ParamField path="channels.cli" type="boolean" default="true">
  Enable the command-line interface channel. Always available for local interaction.
</ParamField>

## Telegram Configuration

### Basic Setup

```json theme={null}
{
  "channels": {
    "telegram": {
      "accounts": {
        "main": {
          "bot_token": "1234567890:ABCdefGHIjklMNOpqrsTUVwxyz",
          "allow_from": ["123456789"],
          "group_allow_from": ["group_chat_id"],
          "group_policy": "allowlist",
          "reply_in_private": true,
          "proxy": null
        }
      }
    }
  }
}
```

<ParamField path="channels.telegram.accounts.<name>.bot_token" type="string" required>
  Telegram bot token from [@BotFather](https://t.me/botfather).
</ParamField>

<ParamField path="channels.telegram.accounts.<name>.allow_from" type="array" required>
  List of Telegram user IDs allowed to interact with the bot in private chats. Use [@userinfobot](https://t.me/userinfobot) to find your user ID.
</ParamField>

<ParamField path="channels.telegram.accounts.<name>.group_allow_from" type="array">
  List of group chat IDs where the bot is allowed to respond.
</ParamField>

<ParamField path="channels.telegram.accounts.<name>.group_policy" type="string" default="allowlist">
  Group access policy: `allowlist` (only respond in listed groups) or `mention_only` (respond when mentioned).
</ParamField>

<ParamField path="channels.telegram.accounts.<name>.reply_in_private" type="boolean" default="true">
  Use reply-to in private (1:1) chats. Groups always use reply-to.
</ParamField>

<ParamField path="channels.telegram.accounts.<name>.proxy" type="string">
  Optional SOCKS5/HTTP proxy URL for Telegram API requests (e.g., `socks5://host:port`).
</ParamField>

## Discord Configuration

```json theme={null}
{
  "channels": {
    "discord": {
      "accounts": {
        "main": {
          "token": "YOUR_DISCORD_BOT_TOKEN",
          "guild_id": "123456789012345678",
          "allow_from": ["user_id_1", "user_id_2"],
          "allow_bots": false,
          "require_mention": false,
          "intents": 37377
        }
      }
    }
  }
}
```

<ParamField path="channels.discord.accounts.<name>.token" type="string" required>
  Discord bot token from the [Discord Developer Portal](https://discord.com/developers/applications).
</ParamField>

<ParamField path="channels.discord.accounts.<name>.guild_id" type="string">
  Optional guild (server) ID to restrict the bot to a specific server.
</ParamField>

<ParamField path="channels.discord.accounts.<name>.allow_from" type="array">
  List of Discord user IDs allowed to interact with the bot.
</ParamField>

<ParamField path="channels.discord.accounts.<name>.allow_bots" type="boolean" default="false">
  Allow other bots to trigger this agent.
</ParamField>

<ParamField path="channels.discord.accounts.<name>.require_mention" type="boolean" default="false">
  Only respond when the bot is mentioned.
</ParamField>

<ParamField path="channels.discord.accounts.<name>.intents" type="number" default="37377">
  Discord gateway intents bitmask (GUILDS | GUILD\_MESSAGES | MESSAGE\_CONTENT | DIRECT\_MESSAGES).
</ParamField>

## Slack Configuration

```json theme={null}
{
  "channels": {
    "slack": {
      "accounts": {
        "main": {
          "mode": "socket",
          "bot_token": "xoxb-...",
          "app_token": "xapp-...",
          "signing_secret": "...",
          "allow_from": ["U123456789"],
          "dm_policy": "pairing",
          "group_policy": "mention_only"
        }
      }
    }
  }
}
```

<ParamField path="channels.slack.accounts.<name>.mode" type="string" default="socket">
  Connection mode: `socket` (Socket Mode) or `http` (Events API with webhooks).
</ParamField>

<ParamField path="channels.slack.accounts.<name>.bot_token" type="string" required>
  Slack bot token (starts with `xoxb-`).
</ParamField>

<ParamField path="channels.slack.accounts.<name>.app_token" type="string">
  App-level token for Socket Mode (starts with `xapp-`). Required when `mode` is `socket`.
</ParamField>

<ParamField path="channels.slack.accounts.<name>.signing_secret" type="string">
  Signing secret for webhook verification. Required when `mode` is `http`.
</ParamField>

<ParamField path="channels.slack.accounts.<name>.dm_policy" type="string" default="pairing">
  Direct message policy: `pairing` (require pairing), `allowlist` (use allow\_from), or `open` (allow all).
</ParamField>

<ParamField path="channels.slack.accounts.<name>.group_policy" type="string" default="mention_only">
  Group/channel policy: `mention_only` (respond when mentioned), `allowlist` (use allow\_from), or `open` (respond to all).
</ParamField>

## Multi-Account Support

Most channels support multiple accounts using the `accounts` object:

```json theme={null}
{
  "channels": {
    "telegram": {
      "accounts": {
        "main": {
          "bot_token": "token1",
          "allow_from": ["user1"]
        },
        "work": {
          "bot_token": "token2",
          "allow_from": ["user2"]
        }
      }
    }
  }
}
```

NullClaw will connect to all configured accounts. The `account_id` field (default: `"default"`) identifies each account.

## Access Control

All channels support allowlist-based access control:

* **`allow_from`** — List of user IDs allowed to interact with the bot
* **`group_allow_from`** — List of group/channel IDs where bot can respond
* **`group_policy`** — How to handle group messages (`allowlist`, `mention_only`, etc.)

<Warning>
  Always configure `allow_from` to prevent unauthorized access. Empty allowlists typically deny all access.
</Warning>

## Supported Channels

NullClaw supports these messaging platforms:

* **CLI** — Command-line interface
* **Telegram** — Telegram Bot API
* **Discord** — Discord gateway
* **Slack** — Socket Mode or Events API
* **WhatsApp** — WhatsApp Business API
* **Matrix** — Matrix protocol
* **Mattermost** — Mattermost integration
* **Signal** — Signal messenger (via signal-cli)
* **IRC** — Internet Relay Chat
* **Email** — IMAP/SMTP
* **iMessage** — Apple Messages (macOS only)
* **Lark** — Lark/Feishu
* **DingTalk** — DingTalk
* **LINE** — LINE messaging
* **QQ** — QQ instant messaging
* **Nostr** — Nostr protocol
* **Web** — WebSocket channel for browser extensions

See [Channels Guide](/essentials/channels) for setup instructions for each platform.
