Slack
Anyy connects to Slack through Socket Mode. A working account needs both a bot token for Web API/message operations and an app token for the WebSocket connection.
1. Prepare the Slack App
In Slack's app configuration:
- Create an app for the intended workspace.
- Enable Socket Mode.
- Create an app-level token with the Socket Mode scope.
- Add the bot scopes required to read the chosen conversations, post messages, and fetch supported files.
- Enable the message event subscriptions required for direct messages and mentioned group conversations.
- Install or reinstall the app to the workspace after scope changes.
Dashboard lists the external prerequisites for Socket Mode, event subscriptions, app-token scopes, and bot-token scopes. Resolve them before enabling the account.
2. Connect It to Anyy
Open Dashboard → Channels → Add channel → Slack and select Socket Mode. Enter:
- bot token (
xoxb-…); - app token (
xapp-…); - an Anyy account label; and
- direct-message and group policies.
CLI setup:
anyy setup channel slack
Both tokens are required when the account is enabled and are saved as Profile secret references.
3. Choose Policies
Slack defaults to pairing for DMs and mention for groups. DM policy supports open, allowlist, pairing, or disabled; group policy supports mention, open, allowlist, or disabled.
Use Slack user IDs for sender allowlists and channel IDs for allowed groups. Prefer pairing/allowlists until you have reviewed model cost and enabled tools.
4. Reload and Test
anyy channel reload
anyy channel doctor slack
DM the app or mention it in a permitted channel. With DM Pairing, approve the pending request:
anyy channel pairing list --channel slack
anyy channel pairing approve --request REQUEST_ID
Threads and Files
Anyy preserves Slack thread timestamps in the channel route and replies inside the originating thread. Supported inbound files are downloaded with the bot credential and staged as scoped attachments after size checks.
Socket Mode does not require a public inbound webhook URL, but the Gateway still needs outbound network access to Slack.
Slack token scopes are fixed by the installed app grant. Changing the app configuration alone may not update the current bot token until the app is reinstalled.
Troubleshooting
| Symptom | Check |
|---|---|
| Socket cannot connect | Verify Socket Mode, the xapp- token, its scope, and outbound network access |
| Authentication works but messages do not arrive | Review event subscriptions, bot scopes, app installation, and channel membership |
| Posting fails | Check the xoxb- token and write scopes for the target conversation |
| DM is held | Approve Pairing, then send a new message |
| File cannot be read | Confirm file scopes, private download access, and configured media maximum |
For general access-grant management, see Messaging Platforms.