This page walks through getting the first channel bot answering messages. Pick the platform you actually use; each section is self-contained.
::: tip Prerequisites You should already have:
garyx --versionworking (Installation)- the gateway running (
garyx statusreturns OK) - at least one provider logged in (Providers) :::
The fastest path. You only need a bot token from @BotFather.
-
Talk to @BotFather,
/newbot, follow prompts, and store the token in your shell environment. -
Register the account with Garyx and bind it to an agent:
export TELEGRAM_BOT_TOKEN="TOKEN_FROM_BOTFATHER" garyx channels add telegram main \ --token "$TELEGRAM_BOT_TOKEN" \ --agent-id claude garyx gateway restart --no-wake
-
DM your bot. Garyx pulls updates with long-polling and routes them through the agent you bound on
--agent-id.
::: info Group chats
By default the bot will only listen in DMs. To enable a group, edit the
account in ~/.garyx/garyx.json and add the chat under
channels.telegram.accounts.<id>.config.groups. See
Configuration → Telegram for the schema.
:::
Use the device-flow login if you do not have an app yet:
garyx channels login feishu --domain feishu # use --domain lark for 海外
garyx gateway restart --no-wakeThe login flow walks you through creating an app and writes the resulting
app_id / app_secret back into garyx.json.
If you already have an app, register it directly:
garyx channels add feishu gary \
--app-id cli_xxxxxxxx \
--app-secret xxxxxxxxxxxx \
--domain feishu \
--agent-id claudeThe gateway opens a Feishu WebSocket; @-mention the bot in any chat it has been added to.
garyx channels login weixin
garyx gateway restart --no-wakeThe login flow scans a QR code in your terminal and writes the resulting
token and uin back into garyx.json.
After adding the Telegram example above, the relevant slice of garyx.json
will look like this:
{
"channels": {
"telegram": {
"accounts": {
"main": {
"enabled": true,
"agent_id": "claude",
"config": {
"token": "${TELEGRAM_BOT_TOKEN}"
}
}
}
}
}
}Built-in channels (telegram, feishu, weixin, api) sit directly under
channels.<channel_id>. Each account has an envelope (enabled, name,
agent_id, workspace_dir) plus a channel-specific config blob — see
Concepts → Channels for why.
- Concepts → Channels — accounts vs endpoint bindings, built-in vs plugin
- Configuration — the full per-channel schema
- CLI commands — every
garyx channelssubcommand - Security — what not to paste into docs, logs, or issues