Slack uses OAuth 2.0 for authentication. You will need to create a Slack app and configure a bearer token for the app.

## 1. Create a Slack App

Go to [Slack API](https://api.slack.com/apps) and create a new app. Click on "Create New App" and navigate to **From scratch** -> Give the app a name and select your workspace from the dropdown -> click on "Create App".

## 2. Configure the App

In the left panel, select **OAuth & Permissions**. Under **Scopes** > **Bot Token Scopes**, select **Add an OAuth Scope** and add each of these scopes:

| Scope | Purpose |
|  --- | --- |
| `channels:read` | List public channels and their members. |
| `groups:read` | List the private channels the app is in, and their members. |
| `im:read` | List the direct messages (DMs) the app is in. |
| `mpim:read` | List the group DMs the app is in. |
| `channels:history` | Read messages in the public channels the app is in. |
| `groups:history` | Read messages in the private channels the app is in. |
| `im:history` | Read messages in the DMs the app is in. |
| `mpim:history` | Read messages in the group DMs the app is in. |
| `channels:join` | Join public channels without an invitation. Needed only when you set *Channels* to `auto`. |
| `chat:write` | Send messages, and edit or delete the messages the app sent. Without it, the integration cannot send messages. |
| `im:write` | Open a DM with a user. Without it, the integration cannot send DMs. |
| `users:read` | List the users in the workspace. |
| `users:read.email` | Read user email addresses, and find a user by email address. |


## 3. (Optional) Add Collaborators

To ensure that you do not lose access to the app you created in step 1, consider using **Settings** -> **Collaborators** to add additional workspace members as collaborators to the app. Collaborators will have full permissions to manage the app in the event the account first used to create it is terminated for any reason (e.g. an employee leaves).

## 4. Install the App

On the left panel navigate to **Install App** -> Click on **Install App to Workspace** -> Click on **Allow**.

A **Bot User OAuth Access Token** will be generated. This is your bearer token. Please copy and save it.

## 5. Configure the Integration

To configure a new Slack integration, provide each of the values as defined below:

| Integration Parameter | Description |
|  --- | --- |
| Token | The Bot User OAuth Access Token you copied in step 4. For example, `xoxb-...`. |
| Channels *(optional)* | `auto` or `manual`. The default is `manual`. With `auto`, the app joins a public channel the first time it reads or sends messages there. Slack then posts a message in the channel to say the app joined. With `manual`, you add the app to each public channel yourself. You always add the app to private channels and group DMs yourself. |
| Base URL *(optional)* | Leave empty to use `https://slack.com/`. |