> For the complete documentation index, see [llms.txt](https://docs.octoxlabs.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.octoxlabs.com/adapters/s/slack.md).

# Slack

Slack is a collaboration platform. OctoXLabs uses the Slack Web API to add the members of your workspace to the user inventory.

## Use cases

* List Slack workspace users.

```
Adapters = slack
```

* Find Slack users who are not in your directory.

```
Adapters = slack AND NOT Adapters = active-directory
```

## Before you begin

### Network

| Source              | Destination         | Port                        | Protocol                           |
| ------------------- | ------------------- | --------------------------- | ---------------------------------- |
| OctoXLabs connector | slack.com (default) | 443 (default, configurable) | HTTPS (HTTP when Is Secure is off) |

### Required permissions

| Scope or role    | Permission       | Needed for               |
| ---------------- | ---------------- | ------------------------ |
| users:read       | User token scope | `users.list`             |
| users:read.email | User token scope | Email addresses of users |

## Create credentials in Slack

{% stepper %}
{% step %}

### Create an app

Create a Slack app at api.slack.com/apps.
{% endstep %}

{% step %}

### Add scopes

Go to **Permissions**, find **User Token Scopes**, click **Add an OAuth Scope** and add **users:read** and **users:read.email**.
{% endstep %}

{% step %}

### Reinstall the app

Click **Reinstall to** .
{% endstep %}

{% step %}

### Copy the token

Copy the **User OAuth Token** that Slack shows.
{% endstep %}
{% endstepper %}

## Connection parameters

| Parameter  | Required | Type    | Default   | Description                        |
| ---------- | -------- | ------- | --------- | ---------------------------------- |
| IP         | No       | String  | slack.com | Host of the Slack API.             |
| Port       | No       | Integer | 443       | Port.                              |
| Token      | Yes      | String  | None      | OAuth user token.                  |
| Is Secure? | No       | Boolean | True      | Use HTTPS.                         |
| Timeout    | No       | Integer | 30        | Seconds to wait for API responses. |

## Troubleshooting

| Error message | Cause                                                                                                                                      | Fix                                                                                                                          |
| ------------- | ------------------------------------------------------------------------------------------------------------------------------------------ | ---------------------------------------------------------------------------------------------------------------------------- |
| Status Code:  | The API answered with a status other than the one the connector expects. The message also lists the URL, the method and the response body. | Read the status code and the response body in the message, then check the credentials, the permissions and the network path. |

## Change history

{% hint style="info" %}
Available starting from version 4.3.0.
{% endhint %}
