Skip to main content
Socket Mode lets you develop and test the Slack integration locally without exposing a public URL. Slack connects to your app over a WebSocket, so there is no need for ngrok or other tunneling tools.

Prerequisites

  • A Slack app configured with Socket Mode enabled (in the Slack API dashboard under Settings > Socket Mode).
  • An app-level token (xapp-...) with the connections:write scope.
  • The Exante backend running locally.

Environment variables

Add these to your .env file:
SLACK_CLIENT_ID=your_slack_app_client_id
SLACK_CLIENT_SECRET=your_slack_app_client_secret
SLACK_SIGNING_SECRET=your_slack_signing_secret
SLACK_APP_TOKEN=xapp-your-app-level-token
SLACK_SOCKET_MODE=true
VariableDescription
SLACK_CLIENT_IDOAuth client ID from your Slack app settings
SLACK_CLIENT_SECRETOAuth client secret from your Slack app settings
SLACK_SIGNING_SECRETSigning secret for webhook signature verification
SLACK_APP_TOKENApp-level token (xapp-...) for Socket Mode
SLACK_SOCKET_MODESet to true to enable Socket Mode

Starting Socket Mode

Run the dedicated Flask CLI command:
FLASK_APP=app flask slack-dev
Or use the Makefile target:
make slack-dev
Socket Mode runs in a dedicated process. Do not start it inside Flask web workers or RQ workers — this would create duplicate WebSocket connections.

Testing events

Once Socket Mode is running:
  1. Open your Slack workspace.
  2. Mention the bot with @Exante in any channel linked to an organization.
  3. Paste an Exante URL to test link unfurling.
  4. Check the terminal output for event processing logs.

Manifest management

The Slack app manifest is stored at app/domains/integrations/slack/manifest.yaml. To verify your local app config matches the deployed manifest:
  1. Export the live manifest from the Slack API dashboard (Settings > App Manifest).
  2. Compare it against manifest.yaml using a diff tool.
  3. If they diverge, update either the manifest file or the Slack dashboard to match.
You can also use the Slack CLI to export the manifest:
slack manifest export --app-id YOUR_APP_ID

Troubleshooting

SymptomCauseFix
SLACK_APP_TOKEN is requiredMissing app-level tokenGenerate one in Slack app settings
Connection refused on startupRedis or database not runningStart all services with make up
Events not arrivingSocket Mode not enabled in SlackEnable in Slack API dashboard
Bot not responding to mentionsChannel not mapped to an organizationMap the channel to your organization
Link previews not showingunfurl_domains not configuredAdd app.exante.com in Slack app settings