mirror of
https://github.com/sipeed/picoclaw.git
synced 2026-05-25 16:00:35 +00:00
667fc85d54
add new field type to Channel struct config.channels refactor to channel_list update config version to 3 update the docs
1.4 KiB
1.4 KiB
Back to README
Slack
Slack is a leading enterprise instant messaging platform. PicoClaw uses Slack's Socket Mode for real-time bidirectional communication, with no need to configure a public webhook endpoint.
Configuration
{
"channel_list": {
"slack": {
"enabled": true,
"type": "slack",
"bot_token": "xoxb-...",
"app_token": "xapp-...",
"allow_from": []
}
}
}
| Field | Type | Required | Description |
|---|---|---|---|
| enabled | bool | Yes | Whether to enable the Slack channel |
| bot_token | string | Yes | Bot User OAuth Token for the Slack bot (starts with xoxb-) |
| app_token | string | Yes | Socket Mode App Level Token for the Slack app (starts with xapp-) |
| allow_from | array | No | User ID whitelist; empty means all users are allowed |
Setup
- Go to Slack API and create a new Slack app
- Enable Socket Mode and obtain the App Level Token
- Add Bot Token Scopes (e.g.
chat:write,im:history, etc.) - Install the app to your workspace and obtain the Bot User OAuth Token
- Fill in the Bot Token and App Token in the configuration file