No results for ""
EXPAND ALL
  • Home
  • API docs

GIVE DOCS FEEDBACK

Setting up Slack accounts and permissions

Read time: 4 minutes
Last edited: May 01, 2024

Overview

This topic explains how to set up the LaunchDarkly Slack app in your team's Slack instance.

Set up the Slack app

When you call the LaunchDarkly Slack app for the first time you will be prompted to log in to your LaunchDarkly account and authorize the Slack app.

To sign in to the LaunchDarkly Slack app:

  1. Type /launchdarkly account in your Slack client's text bar and press Enter. A message appears prompting you to connect your Slack account with LaunchDarkly.
  2. Click Connect with LaunchDarkly.
Signing into the LaunchDarkly Slack App.
Signing into the LaunchDarkly Slack App.
  1. Review the permissions required and click Authorize.
The permissions authorization dialog.
The permissions authorization dialog.

A confirmation dialog appears in your browser and the Slack app's username appears in the Apps section of your Slack client. You can now use the LaunchDarkly Slack app.

The Slack app configuration also appears in the "Slack App" section of the Integrations list.

About Slack app permissions

The Slack app requires you to grant permission for it to work in your Slack account. The list of permissions shown in the authorization dialog is inclusive of everything the app can do, but not all members will be able to perform all actions using the app.

The things the Slack app can do are limited to what the member can do in LaunchDarkly. It never allows members to take actions beyond what their roles in LaunchDarkly allow.

The Slack app does not grant additional permissions to LaunchDarkly members.

For example:

Cody is a LaunchDarkly member with the Reader role. He authorizes the LaunchDarkly Slack app and uses it to view flag information and subscribe channels to notifications. He cannot toggle the flag's targeting on or off in LaunchDarkly using the Slack app, because readers are not allowed to perform that action.

Isha is a LaunchDarkly member with the Admin role. She authorizes the LaunchDarkly Slack app and can use it to view flag information, subscribe channels to notifications, and toggle flags on and off, because those are all actions administrators are allowed to perform.

Add multiple accounts to the Slack app

You can associate multiple LaunchDarkly accounts to your Slack workspace. Individuals can connect their accounts manually by following the instructions in Set Up the Slack app.

You will be able to interact with just one account at a time. You can check which account you are signed in to using /launchdarkly account.

To add more accounts to the Slack app:

  1. Type /launchdarkly account in your Slack client's text bar and press Enter.
  2. The account management field appears.
  3. Click Add an account.
An example of an account associated with the Slack app.
An example of an account associated with the Slack app.

If you want to add another account, click Add an account. You'll then follow the same process as your first account to authorize.

Disconnect an account from the Slack app

When you click the drop down for an existing account, clicking logout will remove the account association with your Slack.

If an account is no longer authorized, you can re-authorize the account by clicking on the name of the account. When you click on the name, you will follow the Onboarding process again.

Understand how LaunchDarkly roles impact Slack app authorization

Connecting your Slack account with your LaunchDarkly account makes two changes. When you complete the OAuth authorization workflow:

  • You allow your Slack and LaunchDarkly accounts to act as a single entity.
  • You automatically create and configure a webhook in LaunchDarkly that sends notifications to your Slack team.

The first item happens for each individual end user. The second item only happens once per team, typically by the first member on the Slack team to authorize the app with LaunchDarkly.

Members with the Reader role in LaunchDarkly do not have the ability to create webhooks. If the first person to authorize the LaunchDarkly Slack app is a Reader, this can cause a problem because that member cannot create the necessary webhook.

To learn more about member permissions, read About member roles.

The Slack app, with limited permissions.
The Slack app, with limited permissions.

If a Reader initially authorizes the Slack app, an error appears. When this happens, the member can only use some of the app's features. They can view and manage flags, but can't subscribe to notifications.

The Slack app, displaying a webhook error.
The Slack app, displaying a webhook error.

To remedy this situation, the member with the Reader role should ask an account member with the Writer role to authorize the Slack app to communicate with LaunchDarkly. After the Writer-level member authorizes the app, the webhook is created. All subsequent account members to authorize the Slack app will be able to subscribe to notifications.