The Sign in with Slack integration enables your AI Agents to authenticate users with their Slack accounts and interact with Slack workspaces on their behalf.

Overview

The Sign in with Slack integration is ideal for AI agents that need to participate in team communications, automate workflows, or provide intelligent assistance within Slack workspaces. This connection provides access to messages, channels, and workspace data.

Configuration

1

Set up a Slack app

  1. Sign up for a Slack Developer account.
  2. If you haven’t already, create a Slack App. Choose the From scratch option, give it a name and choose a workspace.
  3. Once your app is created, copy the Client ID and Client Secret.
  4. In the OAuth & Permissions section on the left side navigation, do the following:
    1. Under OAuth Tokens, opt in for token rotation so that the app supports refresh tokens.
    2. Under Redirect URLs, add https://YOUR_AUTH0_DOMAIN/login/callback as a new Redirect URL.
      You can find the Auth0 domain in the Auth0 Dashboard.You can find this under Applications > [Your Application] > Settings > Basic Information > Domain.If you are using the custom domains feature, your Auth0 domain is the custom domain. You can find this under Branding > Custom Domains.
    3. Under Scopes, add the necessary OAuth scopes your app needs to function.
2

Configure the Slack Social Connection in Auth0

  1. In the Auth0 Dashboard, navigate to Authentication > Social. Select Create Connection and then Sign in with Slack. Click Continue.
  2. In General, enter the Client ID and Client Secret from the Slack OAuth app you created.
  3. In Advanced, toggle Enable Token Vault. This allows the connection to retrieve and store access tokens for third-party APIs securely. To learn more, read Configure Token Vault.
  4. Click Create.
  5. After saving, go the Applications tab and select the applications that should use this connection.

Token Vault configuration Example

To configure the Token Vault for your GitHub connection, you can use the following code snippet in your application:
const auth0AI = new Auth0AI();

export const withSlackConnection = auth0AI.withTokenForConnection({
  connection: "sign-in-with-slack",
  scopes: ["channels:read", ...],
  refreshToken: getAuth0RefreshToken(),
});

Account linking

If you want to use more than one connection for a user, you can link their accounts. This allows the user to log in with any of their linked accounts and have a single user profile in your application. This allows calling APIs from different providers with a single user profile. Learn more about Client-initiated account linking.

Learn more