• Home
  • Integrations
  • SDKs
  • Guides
  • API docs
No results for ""
EXPAND ALL

EDIT ON GITHUB

Setting up Slack accounts and permissions

Read time: 3 minutes
Last edited: Jul 26, 2021

Overview

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

Setting up the Slack app

When you call the LaunchDarkly Slack app for the first time, you will be prompted to associate it with your Slack account.

To sign into the LaunchDarkly Slack app:

  1. Type /launchdarkly account in your Slack client's text bar and press Enter.
  2. A message appears prompting you to connect your Slack account with LaunchDarkly.
  3. Click Connect with LaunchDarkly.

Signing into the LaunchDarkly Slack App.
Signing into the LaunchDarkly Slack App.

  1. Review the permissions required and click Authorize to authorize the Slack app.

The permissions authorization screen
The permissions authorization screen

  1. A confirmation screen 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 appears in the "Webhooks" section of the Integrations dashboard.

The Slack app under Webhooks on the Integrations dashboard.
The Slack app under Webhooks on the Integrations dashboard.

Understanding the Slack app's 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 screen is inclusive of everything the app can do, but not all users will be able to perform all actions using the app.

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

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

For example:

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

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

Adding 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 Setting 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 the Add an Account button. You'll then follow the same process as your first account to authorize.

Disconnecting 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.

Understanding 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 user.
  • You automatically create and configure a webhook in LaunchDarkly that sends notifications to your Slack team.

The first item happens for each individual 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 user cannot create the necessary webhook.

To learn more about member permissions, read Understanding 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 reader-level member should ask an account member with write permission to authorize the Slack app to communicate with LaunchDarkly. After the writer-level user authorizes the app, the webhook is created. All subsequent account members to authorize the Slack app will be able to subscribe to notifications.