Skip to content

Slack

Human integrates with Slack via the Slack API. Supports Socket Mode and event subscriptions.

  • Build with -DHU_ENABLE_SLACK=ON or -DHU_ENABLE_ALL_CHANNELS=ON
  • A Slack workspace (admin or app installer)
  1. Go to Slack APICreate New AppFrom scratch
  2. Name the app and select a workspace
  3. Under OAuth & Permissions:
    • Add Bot Token Scopes: chat:write, chat:write.public, channels:history, groups:history, im:history, mpim:history, app_mentions:read, channels:read, users:read
  4. Under Event Subscriptions: Enable events, add message.channels, message.im, message.groups, app_mention
  5. Under Socket Mode: Enable Socket Mode (for development without public URL)
  6. Install the app to your workspace
  7. Copy Bot User OAuth Token (starts with xoxb-)
  8. If using Socket Mode, copy App-Level Token (starts with xapp-)

Add to ~/.human/config.json:

{
"channels": {
"slack": [
{
"bot_token": "xoxb-...",
"app_token": "xapp-...",
"allow_from": []
}
]
}
}
FieldTypeDescription
bot_tokenstringBot User OAuth Token (xoxb-)
app_tokenstringApp-Level Token for Socket Mode (xapp-)
allow_fromarrayUser IDs to allow. Empty = allow all
  • Socket Mode: Uses WebSocket; no public URL needed. Requires app_token.
  • HTTP/Events: Slack sends events to your gateway at /slack/events. Requires a public HTTPS URL.

Slack channel supports thread replies. The target format is channel_id:thread_ts for replying in a thread.

Start the gateway. With Socket Mode, the app connects outbound. With HTTP, ensure your Slack app’s Event Request URL points to your tunnel/gateway.