Set Up A Messaging Channel
Use this guide when you want one external chat surface to reach the resident Anyy gateway. For platform-specific fields, open the matching page under Messaging Platforms.
Channels do not run inside one-shot CLI calls. Start the resident gateway before expecting inbound messages, outbound replies, cron deliveries, or background-job notifications to move through a messaging platform.
Pick One Implemented Channel
Start with one platform and verify it end to end before adding more.
Implemented channel names are:
| Name | Platform |
|---|---|
telegram | Telegram |
discord | Discord |
slack | Slack |
whatsapp | |
facebook | Facebook Messenger |
email | Email (IMAP/SMTP) |
sms | SMS through Twilio |
dingtalk | DingTalk |
feishu | Feishu / Lark |
weixin | Weixin / WeChat |
qqbot | QQ Bot |
irc | IRC |
line | LINE |
The catalog command shows local setup status:
anyy setup channels
It prints the supported catalog and tells you to run
anyy setup channels CHANNEL --write-config. Planned catalog entries may
appear, but they return a planned-status JSON payload until a runtime adapter ships.
Create Platform Credentials
Create the external platform credentials first. Anyy generally needs one of these shapes:
| Shape | Examples |
|---|---|
| Bot token | Telegram, Discord, Slack, Weixin |
| App id plus secret | Feishu, DingTalk, QQ Bot |
| Webhook token or secret | LINE, SMS, Facebook |
| Bridge URL/token | |
| Host/login secret | Email, IRC |
Store secrets with --secret NAME=VALUE. The setup command writes profile-local
secret files and writes only secret: references into config.yaml.
Write Channel Config
Use the direct setup form:
anyy setup channels CHANNEL \
--account-id ACCOUNT_ID \
--secret NAME=VALUE \
--set FIELD=VALUE \
--write-config
Example:
anyy setup channels discord \
--secret bot_token='discord-bot-token' \
--write-config
The command prints JSON with the config path, redacted secret refs, written secret
names, and a doctor command. It writes channels.<name> only when
--write-config is present.
List fields such as allow_from, allow_groups, channels, or
mention_aliases should be edited as YAML lists after setup:
channels:
discord:
dm_policy: allowlist
allow_from:
- "user-id"
Start Or Reload The Gateway
Channels run inside the resident gateway:
anyy gateway start
After editing channel config while the gateway is running:
anyy channels reload
If reload fails, confirm the gateway is running for the same profile/home:
anyy gateway status
anyy status
Run Channel Doctor
Run the channel-specific doctor and the general doctor:
anyy channels doctor CHANNEL
anyy doctor
channels doctor is an offline config check. It validates config shape, required
fields, secret references, and known readiness gates. It does not create platform
apps, register webhooks, or call provider APIs.
Tighten Access Before Broad Use
Before inviting a bot into groups or broad workspaces, configure admission policy:
channels:
slack:
dm_policy: allowlist
group_policy: mention
allow_from:
- "U0123456789"
allow_groups:
- "C0123456789"
Common policies:
| Policy | Use |
|---|---|
open | Accept matching senders or groups without pairing. |
pairing | Allow initial pairing where the adapter supports it. |
allowlist | Accept only configured ids. |
mention | For groups, require a mention before responding. |
disabled | Ignore inbound messages for that scope. |
Channel access controls who can reach Anyy. It does not grant extra power to risky tools. Approvals, ChangePlans, audit, and tool policy still apply.
Verify A Real Message
Send a small message from the platform:
/status
Then send an ordinary message:
Say hello in one short sentence.
If the command works but ordinary chat does not, check the provider/model config.
If neither works, check gateway logs, channel policy, anyy channels doctor CHANNEL, and the platform setup page's troubleshooting section.