> ## Documentation Index
> Fetch the complete documentation index at: https://docs.validio.io/llms.txt
> Use this file to discover all available pages before exploring further.

# Setting up a Slack App for Validio

> Step-by-step guide to creating and configuring a Slack app for Validio notifications.

This guide outlines the steps to create a Slack app and configure it to communicate with your Validio installation. These steps are a prerequisite for setting up a Validio notification channel for Slack. For more information, see the [Slack integration](https://docs.validio.io/v10.0/docs/integrations/notification-channels/slack.md).

You will need to complete the following steps before you can create a notification channel to send messages and alerts from Validio to your Slack workspace:

1. Create a Slack app for Validio
2. Generate tokens and scopes
3. Invite the app to your channels

## Create a Slack app for Validio

In your [App Management dashboard](https://api.slack.com/apps),

1. Click Create New App and Create an app from scratch.
2. Give your app a name and assign it to your Slack workspace.

![The Slack Create an app dialog, with a name entered and a workspace selected](https://mintcdn.com/validio/h4NQPs1kJwlpB1Yj/images/docs/integrations/setup-slack-create-app.png?fit=max\&auto=format\&n=h4NQPs1kJwlpB1Yj\&q=85\&s=d2011e13ab06b8092df3cf18e73e6d66)

Create a new Slack app for your Validio notifications

You will use authentication and app credentials from the created app to set up a Slack notification channel within Validio. This enables Validio to send messages to any configured Slack channels and process user interactions on those messages (such as muting incidents from Slack).

For more information, see Slack documentation on [creating a new Slack app](https://api.slack.com/quickstart#creating).

## Generate tokens and scopes

Slack uses scopes to give your app permissions to perform actions, such as posting messages to your workspace. When you create tokens, you need to make sure that tokens have the appropriate scopes assigned to them. You will need to create two tokes: an app-level token and a bot token.

### App-level token

App-level tokens require "Socket Mode" to be enabled for the app. For new Slack notification channels, use the following steps to create enable Socket Mode and create new app-level tokens. To migrate existing Slack notification channels to use Socket Mode, see [Migrating Slack App to Socket Mode](https://docs.validio.io/v10.0/docs/integrations/notification-channels/slack/migrating-slack-app-to-socket-mode.md).

![The Socket Mode settings page in Slack with Connect using Socket Mode enabled](https://mintcdn.com/validio/h4NQPs1kJwlpB1Yj/images/docs/integrations/900-slack-enable-socket-mode.png?fit=max\&auto=format\&n=h4NQPs1kJwlpB1Yj\&q=85\&s=de7776786db0f579917745626a51f279)

Enable "Socket Mode" in your Slack app.

To create a new app-level token in your [App Management Dashboard](https://api.slack.com/apps),

1. If socket mode is not enabled in your app, navigate to **Settings > Socket Mode > Connect using Socket Mode** to enable the feature. After you enable socket mode, Slack will prompt you to create a new app-level token. Continue to Step 3.
2. If socket mode is already enabled, and you need to create a new app-level token, navigate to **Settings > Basic Information > App-Level Tokens** and click **Generate Token and Scopes**.

![The Slack Generate an app-level token dialog, showing the token name and scopes fields](https://mintcdn.com/validio/h4NQPs1kJwlpB1Yj/images/docs/integrations/slack-app-token.png?fit=max\&auto=format\&n=h4NQPs1kJwlpB1Yj\&q=85\&s=ce12d3598b31c302b4ee4682f8393945)

Generate an app-level token

3. Enter a **Token Name**.
4. If there are no scopes assigned to the token, click **Add Scope** and add `connections:write`.
5. Click **Generate**. App-level tokens contain the following prefix in their string: `xapp-`
6. Copy and save this token to configure the Slack notification channel in Validio.

### Bot User OAuth token and scopes

The bot token is a user OAuth token that will be automatically generated when you install your app to your workspace. Before you create the bot token, you need to first assign it the appropriate scopes. For more information, see Slack documentation on [assigning scopes to an app](https://api.slack.com/quickstart#scopes) and [installing an app to a workspace](https://api.slack.com/quickstart#installing).

You can find the bot token and scopes settings in your App Management dashboard under **Features > OAuth & Permissions**.

To create a new bot token,

1. Under **Scopes > Bot Token Scopes**, add the following OAuth scopes for your bot token:

![The Slack Bot Token Scopes section listing the OAuth scopes required by Validio](https://mintcdn.com/validio/h4NQPs1kJwlpB1Yj/images/docs/integrations/slack-bot-token-scopes.png?fit=max\&auto=format\&n=h4NQPs1kJwlpB1Yj\&q=85\&s=16df9a1652b5d88d36cd39f41f2243c2)

Add bot token scope to your app

2. Under **OAuth Tokens**, click the button to install the app to your workspace and automatically generate the bot token.
3. Review the access request to your workspace and click **Allow**.

   When the bot token is generated, you will see it under **Bot User OAuth Token**. Bot tokens contain the following prefix in their string: `xoxb-`
4. Copy and save this token to configure the Slack notification channel in Validio.

## Invite the app to channels

To allow the app to post messages, invite the installed app to any relevant Slack channels where you want to route incident notifications from Validio.

![Adding the Validio app to a Slack channel from the channel integrations tab](https://mintcdn.com/validio/h4NQPs1kJwlpB1Yj/images/docs/integrations/slack-setup-add-to-channel.png?fit=max\&auto=format\&n=h4NQPs1kJwlpB1Yj\&q=85\&s=a1c178c88b55ced72f82e204963157d4)

Add your app to the Slack channel

## Configure a Validio notification channel for Slack

After you set up your Slack app for Validio, you can create a Validio notification channel to communicate with the Slack app and send messages and alerts to your workspaces and channels in Slack. For more information, see steps for configuring a [Validio Notification Channel for Slack](https://docs.validio.io/v10.0/docs/integrations/notification-channels/slack.md).
