Skip to main content

Credentials

1. Create a Slack App

  1. Go to https://api.slack.com/apps
  2. Create New App -> From scratch
  3. Name it (e.g., “Mirage”) and select your workspace

2. Configure Bot Permissions

  1. OAuth & Permissions in the left sidebar
  2. Under Bot Token Scopes, add:
    • channels:history - read messages in public channels
    • channels:read - list public channels
    • groups:history - read messages in private channels (optional)
    • groups:read - list private channels (optional)
    • chat:write - send messages (for write mode)

3. Install to Workspace

  1. Install App in the left sidebar -> Install to Workspace
  2. Authorize the requested permissions
  3. Copy the Bot User OAuth Token (xoxb-...)
Slack’s search.messages API does not accept bot tokens. To use slack search or workspace-level search push-down:
  1. Add search:read under User Token Scopes.
  2. Reinstall or reauthorize the app.
  3. Copy the resulting User OAuth Token (xoxp-...).
Keep using the bot token for normal reads and writes. Mirage uses the optional user token only for Slack search endpoints.

5. Set Environment Variables

6. Invite the Bot

The bot must be invited to channels it needs to read:
For Python configuration, see the Python Slack Setup guide.