Skip to content
Last updated

Slack integration

Integrating Slack with Frontegg allows your application to read user profiles, browse channels and conversations, post, update, and delete messages, read threads, create and manage channels and their membership, open direct messages, manage files, and search 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

Create a Slack app

Step 1: Open your apps

Sign in to the Slack API console 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

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

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

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

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 the redirect URL shown in the Frontegg portal for this integration — copy it whole, including the path. See How to get your Redirect URL.

The value has this shape, but take the real one from the portal rather than assembling it:

  • https://YOUR_MCP_GATEWAY_URL/integration-callback

Click Add, then Save URLs.

OAuth & Permissions Redirect URLs section with Frontegg callback URL entered

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

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

Step 8: Select the user token scopes

Type each scope name into the search box and select it from the dropdown. Select the following scopes:

ScopeDescription
users.profile:readView profile details about people in the workspace
users:readView people in the workspace
users:read.emailView email addresses of people in the workspace
team:readView the workspace's name, domain, and icon
channels:readView basic information about public channels
channels:writeManage public channels and their membership
channels:historyView messages and other content in public channels
groups:readView basic information about private channels
groups:writeManage private channels and their membership
groups:historyView messages and other content in private channels
im:readView basic information about direct messages
im:writeStart direct messages with people
im:historyView messages and other content in direct messages
mpim:readView basic information about group direct messages
mpim:writeStart group direct messages
mpim:historyView messages and other content in group direct messages
chat:writeSend, update, and delete messages
files:readView files shared in channels and conversations
files:writeUpload and delete files
search:readSearch the workspace's content

Add all of them, and nothing more

Slack fails the entire authorization when any single requested scope cannot be granted, so a missing scope breaks the connection completely rather than only the matching operations. For the same reason, do not add admin.* scopes: they require an Enterprise organization and an org-wide install, and on a normal workspace they take the whole integration down.

User Token Scopes list with the selected Slack scopes

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.

Adding a scope later needs a fresh authorization

Scopes are granted once, when the user authorizes the app. If you add a scope afterwards, existing connections keep their old grant and the new operations stay unavailable until each user reconnects.

Capabilities

  • A person can be reached by email alone: looking them up by address yields a user, opening a direct message with that user yields a channel, and a message can then be posted to it.
  • Messages can be updated and deleted after posting, and a permalink can be generated for any message.
  • Channels can be created, renamed, archived and unarchived, given a topic or purpose, and have members invited or removed.

Provider limitations

  • Messages are attributed to the app, not to the person who authorized it. Even though the integration uses a user token, a posted message shows the app as its author, so it does not read as "sent by me".
  • Listings return at most 999 items per page and are paged with a cursor. File listings are the exception and use page numbers instead.
  • Listing a user's conversations returns public channels only unless other conversation types are asked for explicitly — direct messages and private channels are not included by default.
  • Slack's message search is a legacy method and works only with a user token. It also needs its own scope, so on an existing connection it stays unavailable until the user reconnects.
  • Reading a workspace's people returns personal data, including email addresses, so those listings should be handled accordingly.

Additional resources