## Slack integration Integrating Slack with Frontegg allows your application to read user profiles, browse channels and conversations, post messages, manage files, and search across a Slack workspace — all through Frontegg's integration layer using Slack OAuth v2 (user tokens). Prerequisites - A Slack workspace where you have permission to create and install apps - Access to the [Slack API console](https://api.slack.com/apps) ### Create a Slack app #### Step 1: Open Your Apps Sign in to the [Slack API console](https://api.slack.com/apps) with an account that belongs to the workspace where you want to install the app. Click **Create an App** at the top of the page. ![Slack API Your Apps page with Create an App highlighted](/assets/slack-1.52331b4dd1086d1181c8e0ac26c8c6c3047c3c40407cf60ba07effd9f835a5d0.1ce25488.png) #### Step 2: Choose From scratch In the **Create an app** dialog, choose **From scratch** to configure the app manually through the UI. ![Create an app dialog with From scratch highlighted](/assets/slack-2.5ae8e7581bc7a65a8d3af9fe5a8fd82e120495041851589d4036aa049c6d3b93.1ce25488.png) #### Step 3: Name the app and pick a workspace Enter an **App Name** (for example, `Frontegg Integration`) and pick the Slack workspace you want to develop the app in. Click **Create App**. Workspace is permanent You can't change the app's development workspace after creation. Pick the workspace whose data you want Frontegg to access. ![Name app and choose workspace dialog with Create App highlighted](/assets/slack-3.f45867c029eace3989f04f62f361f4d712b844bf9aa114351cd509535b00943b.1ce25488.png) #### Step 4: Copy the Client ID and Client Secret After creation, you are taken to the app's **Basic Information** page. Scroll to the **App Credentials** section. Copy the **Client ID** and click **Show** next to **Client Secret** to reveal and copy the secret — you'll need both when configuring the Frontegg portal. Keep your Client Secret safe The Client Secret authenticates your Frontegg integration to Slack. Never share or commit it to version control. ![Slack app Basic Information page with Client ID and Client Secret highlighted](/assets/slack-4.6b97f21d7eb304f10c0729b6f8eaeb49ecd14090114c22fe8c0ec1c4cb195bd3.1ce25488.png) ### Configure OAuth & Permissions #### Step 5: Add the Frontegg redirect URL In the left sidebar, click **OAuth & Permissions**. Under **Redirect URLs**, click **Add New Redirect URL** and enter: ``` https://YOUR_MCP_GATEWAY_URL/integration-callback ``` Click **Add**, then **Save URLs**. ![OAuth & Permissions Redirect URLs section with Frontegg callback URL entered](/assets/slack-5.cb550051bbd22e270518a9c24d0456406c874fbc29b96842573c7950c5dd17db.1ce25488.png) #### Step 6: Confirm the saved redirect URL The Redirect URL now appears in the list. Verify the URL matches your Frontegg MCP Gateway exactly — a mismatch will cause the OAuth flow to fail with `bad_redirect_uri`. ![Redirect URLs section showing the saved Frontegg callback URL](/assets/slack-6.c6b9c95d385834ad3f2e0ec6f12db4e25f2147e8de33321a267604837b4f1031.1ce25488.png) #### Step 7: Open the User Token Scopes section Scroll down to **Scopes**. Frontegg uses **User Token Scopes** (not Bot Token Scopes) — Slack issues a user token that acts on behalf of the user who authorizes the app. Click **Add an OAuth Scope** under **User Token Scopes**. Use User Token Scopes, not Bot Token Scopes Frontegg requests user tokens via Slack's `user_scope` parameter. Scopes added under **Bot Token Scopes** are not granted to the user token and won't be available to Frontegg. ![Scopes section with User Token Scopes Add an OAuth Scope highlighted](/assets/slack-7.ee6322419585a65d3d9d71e57b317caf34d74b1155ebefbe8bcbdbcb34fa7bf2.1ce25488.png) #### Step 8: Select User Token Scopes Type each scope name into the search box and select it from the dropdown. Select the following scopes: | Scope | Description | | --- | --- | | `users.profile:read` | View profile details about people in the workspace (required) | | `users:read` | View people in the workspace (required) | | `users:read.email` | View email addresses of people in the workspace (required) | | `channels:read` | View basic information about public channels | | `channels:history` | View messages and other content in public channels | | `chat:write` | Send messages on the user's behalf | | `files:read` | View files shared in channels and conversations | | `search:read` | Search the workspace's content | Add more scopes as needed Slack supports many additional user scopes — for example `groups:*` for private channels, `im:*` for direct messages, `reactions:*`, `pins:*`, `reminders:*`, and `admin.*` scopes for org-wide actions. Add only the scopes your application needs. ![User Token Scopes list with the selected Slack scopes](/assets/slack-8.098b8cf4f55470d41b3af75dd98a7a15b8b31750c436bbd1ae7769ea23a31de4.1ce25488.png) ### Configure the Frontegg portal Once you have your **Client ID** and **Client Secret**, enter them in the Frontegg portal: 1. Open the **Frontegg portal** and navigate to [ENVIRONMENT] → Integrations → Slack. 2. Enter the **Client ID** and **Client Secret** in the corresponding fields. 3. Select the required **scopes**. 4. Click **Save**. When a user authorizes the integration, Slack will prompt them to choose the workspace where the app should be installed and to approve the requested scopes. ### Additional resources - [Slack Web API methods](https://docs.slack.dev/reference/methods) - [Slack OAuth scopes reference](https://docs.slack.dev/reference/scopes) - [Installing with OAuth (Slack)](https://docs.slack.dev/authentication/installing-with-oauth/) - [Slack API console](https://api.slack.com/apps) - [How to get your Redirect URL](/agen-for-work/connectors/redirect-url)