> ## Documentation Index
> Fetch the complete documentation index at: https://meepa.mintlify.site/llms.txt
> Use this file to discover all available pages before exploring further.

# Slack

> Connect MeepaGateway to Slack

Connects via [Socket Mode](https://api.slack.com/apis/connections/socket) — no public inbound URL required.

## Prerequisites

1. A [Slack app](https://api.slack.com/apps) with **Socket Mode** enabled
2. An **App-Level Token** (`xapp-...`) with `connections:write` scope
3. A **Bot Token** (`xoxb-...`) with these scopes: `chat:write`, `channels:history`, `channels:read`, `users:read`, `app_mentions:read`

## Configuration

In `~/.meepagateway/agents/<id>/agent.yaml`:

```yaml theme={null}
connectors:
  - type: slack
    bot_token: "xoxb-..."
    app_token: "xapp-..."
```

<ParamField path="bot_token" type="string" required>
  Slack Bot User OAuth Token (starts with `xoxb-`).
</ParamField>

<ParamField path="app_token" type="string" required>
  Slack App-Level Token with `connections:write` scope (starts with `xapp-`).
</ParamField>

## Behavior

* The bot calls `auth.test` on connect to learn its own user ID and filter self-messages
* Usernames are resolved from Slack user IDs via `users.info` and cached in memory
* Responds to both regular messages and `app_mention` events
* Long responses are chunked at Slack's 4000-character limit
* Rate limits are handled automatically
