Skip to content

Slack App Setup

Create a Slack app with OAuth scopes for messaging, channels, files, and user management.

  1. Create a Slack App

    Go to the Slack API Dashboard and click “Create New App”. Select “From scratch” and choose your workspace.

  2. Configure OAuth & Permissions

    Navigate to “OAuth & Permissions” in your app settings.

  3. Add Redirect URL

    Add the OAuth redirect URL for Fp Switchboard:

    https://api.switchboard.fpdigital.ai/oauth/slack/callback
  4. Add Bot Token Scopes

    Add the following bot token scopes to enable all Fp Switchboard features:

    channels:history
    channels:read
    channels:write
    channels:write.invites
    chat:write
    files:read
    files:write
    groups:history
    groups:read
    groups:write
    im:history
    im:read
    im:write
    mpim:history
    mpim:read
    mpim:write
    reactions:read
    reactions:write
    users:read
    users:read.email
    team:read
    search:read
    pins:read
    pins:write
    bookmarks:read
    bookmarks:write
    dnd:read
    dnd:write
    reminders:read
    reminders:write
    usergroups:read
    usergroups:write
    emoji:read
  5. Get Client Credentials

    Go to “Basic Information” and copy the Client ID and Client Secret.

  6. Install App to Workspace

    Install the app to your workspace to test the integration. This generates the initial tokens.

Terminal window
npx wrangler secret put SLACK_CLIENT_ID
npx wrangler secret put SLACK_CLIENT_SECRET
VariableDescription
SLACK_CLIENT_IDClient ID from Slack App Basic Information
SLACK_CLIENT_SECRETClient Secret from Slack App Basic Information
https://api.switchboard.fpdigital.ai/oauth/slack/callback
  • “missing_scope” error: Ensure all bot token scopes listed above are added. Slack requires exact scope names.
  • “not_in_channel” error: The bot must be invited to the channel before it can post or read messages.
  • DM access: The bot needs im:read and im:write scopes to read/send direct messages. Users must initiate a DM with the bot first.
  • Enterprise Grid: Enterprise Grid workspaces may require org-level app approval. Contact your Slack admin.
  • Token rotation: Slack bot tokens don’t expire unless the app is uninstalled or tokens are manually rotated.
  1. Go to your Switchboard Dashboard
  2. Navigate to the Slack service page
  3. Click Connect and authorize the app in your workspace
  4. Click Test Connection to verify
  5. Invite the bot to a test channel and try: “List messages in #general”