# Configuring Slack Notifications

This section demonstrates how to install the Slack App in your Slack workspace and receive notifications to your Slack channels and direct messages.

## Prerequisites <a href="#prerequisites" id="prerequisites"></a>

* Make sure you have sufficient permissions for your Slack workspace to install the Slack App.
* Make sure you have an NVIDIA Run:ai API token. See [How to authenticate to the API](https://run-ai-docs.nvidia.com/api/2.24/getting-started/how-to-authenticate-to-the-api) for more details.

## Install a New Slack App <a href="#install-a-new-slack-app" id="install-a-new-slack-app"></a>

1. Visit <https://api.slack.com/apps> and generate an [App Configuration token](https://api.slack.com/authentication/config-tokens)
2. Copy the access token (should start with `xoxe.xoxp)`
3. Send a POST request using the [Create Slack app](https://run-ai-docs.nvidia.com/api/2.24/notifications/slack) API and add the access token:

```bash
{
  "accessToken": "THE_GENERATED_ACCESS_TOKEN_FROM_PREVIOUS_STEP"
}
```

4. The request creates your Slack App and returns the newly created Slack App’s URL. For example:

```bash
{
  "slackAppUrl": "https://api.slack.com/apps/A089PHD5S0Q"
}
```

4. Open the URL, scroll down to `Display Information` and click `Add App Icon` to set the image for the bot
5. Under `Features`, click `OAuth & Permissions`
6. Click the `Install to Workspace` button to install the Slack App to your Slack workspace and accept the requested permissions
7. Now you have the `Bot User OAuth Token`

## Configure Slack Notifications

To receive Slack notifications, use the [Create configuration of notification channel](https://run-ai-docs.nvidia.com/api/2.24/notifications/notificationchannels#post-api-v1-notification-channels) API. Use the `Bot User OAuth Token` obtained above and add it to the `apiToken` field.
