Slack API Setup
Admin walkthrough for the Slack integration. End-user flow: Connections → Slack.
Overview
| Form field | Options key |
|---|---|
| Client ID | slack_client-id |
| Client Secret | slack_client-secret |
| Signing Secret | slack_signing-secret (optional) |
| Status | slack_integration_status |
ENV fallback: SLACK_CLIENT_ID, SLACK_CLIENT_SECRET, SLACK_SIGNING_SECRET.
Signing Secret is optional
You only need the Signing Secret if you wire Slack-side webhooks (interactivity / events) back into Sosyabot. Pure outbound publishing uses Client ID + Secret alone.
Step-by-step on api.slack.com/apps
1. Create a new Slack app
https://api.slack.com/apps → Create New App → From scratch.
- App Name: e.g. "Sosyabot"
- Pick a development workspace (you can install to others later).
2. Configure OAuth & Permissions
Left sidebar → OAuth & Permissions.
- Redirect URLs:
https://app.sosyabot.com/api/v1/auth/slack/callback - Bot Token Scopes: add
chat:writechannels:readgroups:readchannels:joinfiles:write
Save changes.
3. (Optional) Configure event webhooks
If you'll receive Slack-side events (interactivity, slash commands), open Event Subscriptions and set Request URL — that's where the Signing Secret matters. For Sosyabot's default outbound-only mode, skip this section.
4. Grab credentials
Left sidebar → Basic Information:
- App Credentials → Client ID: copy.
- App Credentials → Client Secret: click Show and copy.
- App Credentials → Signing Secret: copy if you need it (otherwise leave empty in the admin form).
Pasting into Sosyabot admin panel
/admin/api-integration/slack:
- Client ID: paste.
- Client Secret: paste.
- Signing Secret: paste only if needed.
- Status: Enable.
- Save → Test credentials.
Failure: Slack integration disabled: client id/secret not configured.
Verification
/app/channels → Connect → Slack → approve scopes → pick a default channel on the post-connect screen. The bot will auto-join the channel if needed (channels:join). Send a test message from /app/publishing.
Troubleshooting
| Symptom | Cause | Fix |
|---|---|---|
Slack integration disabled: client id/secret not configured | Admin + ENV empty | Steps 1–4. |
slack_no_channels on connect | Bot has zero writable channels in the workspace | Either pre-invite the bot to a channel (/invite @sosyabot) or grant the workspace owner role. |
| Posts to private channel fail | Missing groups:read scope | Add groups:read to Bot Token Scopes; reinstall the app to the workspace. |
not_in_channel on send | Bot was kicked from the channel | Re-invite the bot. |
ENV fallback
SLACK_CLIENT_ID=<your client id>
SLACK_CLIENT_SECRET=<your client secret>
SLACK_SIGNING_SECRET=<your signing secret> # optionalAfter editing .env run ./service.sh restart api.