Credentials
1. Create a Slack App
- Go to https://api.slack.com/apps
- Create New App -> From scratch
- Name it (e.g., “Mirage”) and select your workspace
2. Configure Bot Permissions
- OAuth & Permissions in the left sidebar
- Under Bot Token Scopes, add:
channels:history- read messages in public channelschannels:read- list public channelsgroups:history,groups:read- private channels (optional)im:history,im:read- direct messages (optional)mpim:history,mpim:read- group direct messages (optional)users:read- the VFSusers/directory
chat:write only for the CLI send-message command, and files:write for
upload-file. The mount never posts.
3. Install to Workspace
- Install App in the left sidebar -> Install to Workspace
- Authorize the requested permissions
- Copy the Bot User OAuth Token (
xoxb-...)
4. Optional: Enable Workspace Search
Slack’ssearch.messages API does not accept bot tokens. To use slack search or workspace-level search push-down:
- Add
search:readunder User Token Scopes. Forgrepandrg, also addchannels:read,groups:read,im:readandmpim:read, so Mirage can see which channels and DMs that user’s search covers. - Reinstall or reauthorize the app.
- Copy the resulting User OAuth Token (
xoxp-...).
5. Set Environment Variables
6. Invite the Bot
The bot must be invited to channels it needs to read; a channel it is not in answersPermission denied: