Skip to content

Slack API Setup

Admin walkthrough for the Slack integration. End-user flow: Connections → Slack.

Overview

Form fieldOptions key
Client IDslack_client-id
Client Secretslack_client-secret
Signing Secretslack_signing-secret (optional)
Statusslack_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/appsCreate 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:write
    • channels:read
    • groups:read
    • channels:join
    • files: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:

  1. Client ID: paste.
  2. Client Secret: paste.
  3. Signing Secret: paste only if needed.
  4. Status: Enable.
  5. 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

SymptomCauseFix
Slack integration disabled: client id/secret not configuredAdmin + ENV emptySteps 1–4.
slack_no_channels on connectBot has zero writable channels in the workspaceEither pre-invite the bot to a channel (/invite @sosyabot) or grant the workspace owner role.
Posts to private channel failMissing groups:read scopeAdd groups:read to Bot Token Scopes; reinstall the app to the workspace.
not_in_channel on sendBot was kicked from the channelRe-invite the bot.

ENV fallback

SLACK_CLIENT_ID=<your client id>
SLACK_CLIENT_SECRET=<your client secret>
SLACK_SIGNING_SECRET=<your signing secret>   # optional

After editing .env run ./service.sh restart api.