PluginsSlack
Get Credentials
Step-by-step instructions for obtaining Slack credentials
This guide walks you through obtaining all required credentials for the Slack plugin.
Authentication Methods
The Slack plugin supports two authentication methods:
api_key(default) - Bot token authenticationoauth_2- OAuth 2.0 user authentication
API Key Authentication (Bot Token)
Step 1: Create a Slack App
- Go to api.slack.com/apps
- Click Create New App
- Choose From scratch
- Enter your app name and select your workspace
- Click Create App
Step 2: Configure Bot Token Scopes
- In your app settings, go to OAuth & Permissions in the left sidebar
- Scroll to Scopes → Bot Token Scopes
- Add the required scopes:
channels:read- View basic information about public channelschannels:write- Manage public channelschat:write- Send messagesfiles:read- View files shared in channelsfiles:write- Upload, edit, and delete filesusers:read- View people in a workspacereactions:write- Add and remove emoji reactions- Add any other scopes your application needs
Step 3: Install App to Workspace
- Scroll to the top of the OAuth & Permissions page
- Click Install to Workspace
- Review the permissions and click Allow
Step 4: Copy Bot Token
- After installation, you'll be redirected back to OAuth & Permissions
- Under OAuth Tokens for Your Workspace, find Bot User OAuth Token
- Click Copy to copy the token (starts with
xoxb-) - Store this token securely
Storing Credentials:
Store the bot token with the Corsair CLI:
pnpm corsair setup --slack bot_token=xoxb-your-bot-tokenVerify it was saved:
pnpm corsair auth --plugin=slack --credentialsOAuth 2.0 Authentication
Step 1: Create a Slack App
- Go to api.slack.com/apps
- Click Create New App
- Choose From scratch
- Enter your app name and select your workspace
- Click Create App
Step 2: Configure OAuth Settings
- Go to OAuth & Permissions in the left sidebar
- Under Redirect URLs, click Add New Redirect URL
- Add your OAuth redirect URL (e.g.,
https://yourapp.com/auth/slack/callback) - Click Save URLs
Step 3: Get Client Credentials
- Scroll to App Credentials section
- Copy the Client ID and Client Secret
- Store these securely
Storing Credentials:
Store your OAuth app credentials, then start the flow:
pnpm corsair setup --slack client_id=your-client-id client_secret=your-client-secret
pnpm corsair auth --plugin=slackThe CLI will print an authorization URL — open it in a browser. Once you approve, tokens are saved automatically.
Webhook Signing Secret
Step 1: Enable Event Subscriptions
- In your Slack app settings, go to Event Subscriptions in the left sidebar
- Toggle Enable Events to On
- Enter your Request URL (e.g.,
https://yourapp.com/api/webhook) - Slack will send a verification request - ensure your endpoint handles it
Step 2: Subscribe to Bot Events
- Scroll to Subscribe to bot events
- Click Add Bot User Event
- Add events you want to receive:
message.channels- Messages posted to channelschannel_created- A channel was createdreaction_added- A reaction was addedteam_join- A new member joineduser_change- A user's profile was updatedfile_created- A file was createdfile_public- A file was made publicfile_shared- A file was shared
Step 3: Get Signing Secret
- Scroll to the top of the Event Subscriptions page
- Under Signing Secret, click Show and copy the secret
- Store this securely
Storing Credentials:
Store the signing secret with the CLI:
pnpm corsair setup --slack webhook_signature=your-signing-secretRequired Credentials Summary
| Credential | Required For | Where to Find |
|---|---|---|
Bot Token (xoxb-...) | API Key auth | OAuth & Permissions → Bot User OAuth Token |
| Client ID | OAuth 2.0 | OAuth & Permissions → App Credentials |
| Client Secret | OAuth 2.0 | OAuth & Permissions → App Credentials |
| Signing Secret | Webhooks | Event Subscriptions → Signing Secret |
For general information about how Corsair handles authentication, see Authentication.