# Slack

[Slack](https://slack.com/) is a business communication platform offering many IRC-style features, including persistent chat rooms (channels), private groups, and direct messaging.

## Account integration using OAuth

To begin, you will need:

* An [Slack](https://slack.com/) account.

**STEP 1:** Go to the [Slack API page](https://api.slack.com/), then in the top-right corner, go to **\[Your apps]**.

<figure><img src="https://3400071099-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FypCKq44Psaly6khgrY7x%2Fuploads%2F6f8nD3Q5gTDCJ8dfz7Uv%2FSlack_OAuth_1.png?alt=media&#x26;token=50df367e-e100-49fd-92b7-9359702bfd2b" alt=""><figcaption><p>Slack API homepage</p></figcaption></figure>

**STEP 2:** Go to **\[Create New App] > \[From scratch]**.

![](https://3400071099-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FypCKq44Psaly6khgrY7x%2Fuploads%2FzmVc4xW5nsY7WKx61zyH%2FSlack_OAuth_2a.png?alt=media\&token=46bb3b07-5aaf-4b5c-9c91-ee77c5dd476d)

![](https://3400071099-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FypCKq44Psaly6khgrY7x%2Fuploads%2F39y69ZuXzYPQVc2Eivl2%2FSlack_OAuth_2b.png?alt=media\&token=64f49f7a-a0e2-4f9f-9bae-3eedd576388c)

**STEP 3:** Enter an **App Name** and select the **workspace** the credential will be associated with, then click **\[Create App]**.

![](https://3400071099-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FypCKq44Psaly6khgrY7x%2Fuploads%2FJHeQTBurvxrcmmBAtyKB%2FSlack_OAuth_3.png?alt=media\&token=9911dd5e-adbc-416c-8708-357106ddb0c6)

**STEP 4:** Under the **Basic Information > App credentials** section, identify and copy the **client ID** and client secret.

![](https://3400071099-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FypCKq44Psaly6khgrY7x%2Fuploads%2FB3ioUsGcOC50WnecuYuY%2FSlack_OAuth_4.png?alt=media\&token=9b51bf9b-6671-484c-b09a-760704cb1f27)

**STEP 5:** In iMBrace, create a new credential of type **Slack OAuth2 API**, and paste the client ID and client secret into the corresponding fields. Then, identify the **OAuth Redirect URL**.

<figure><img src="https://3400071099-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FypCKq44Psaly6khgrY7x%2Fuploads%2FyobKm2jkd3qn95Sukj0s%2FSlack_OAuth_05.png?alt=media&#x26;token=2bd32840-58c7-453e-8b2e-1d75a2a383fe" alt=""><figcaption></figcaption></figure>

**STEP 6:** On the Slack API page, navigate to **Basic Information > Building Apps for Slack > Add features and functionality > \[Permissions]**.

![](https://3400071099-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FypCKq44Psaly6khgrY7x%2Fuploads%2FcyYPW1s5TM63zqBgDrn7%2F9.png?alt=media)

**STEP 7:** In the **Redirect URLs** section, click on **\[Add New Redirect URL]**, then paste the OAuth redirect URL copied from iMBrace.

![](https://3400071099-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FypCKq44Psaly6khgrY7x%2Fuploads%2Fay3PrU9QMGBsorIInJXL%2F10.png?alt=media)

![](https://3400071099-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FypCKq44Psaly6khgrY7x%2Fuploads%2FuAaIPuvDl51sfN7IPIMI%2F12.png?alt=media)

**STEP 8:** Click on the **\[Save URLs]** button.

![](https://3400071099-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FypCKq44Psaly6khgrY7x%2Fuploads%2FntsS9oF92OiOtUyOxGRR%2F13.png?alt=media)

**STEP 9:** Scroll down to the **Scopes** section.

![](https://3400071099-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FypCKq44Psaly6khgrY7x%2Fuploads%2Fbz152b7OG2tXakHmqMOL%2F14.png?alt=media)

**STEP 10:** Add the required scopes under the **Bot Token Scopes** section. You can refer to the list of scopes on the [Scopes and permissions](https://api.slack.com/scopes) documentation on Slack.

![](https://3400071099-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FypCKq44Psaly6khgrY7x%2Fuploads%2FXBmNDlaLKZZTe4P8i22J%2F15.png?alt=media)

![](https://3400071099-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FypCKq44Psaly6khgrY7x%2Fuploads%2FZSB9e3hKcFhiKFsO4fk9%2FSlack_OAuth_10b.png?alt=media\&token=faac9587-52bd-48d7-9b36-0519b77bfa79)

**STEP 11:** In iMBrace, click the **\[Connect]** button.

![](https://3400071099-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FypCKq44Psaly6khgrY7x%2Fuploads%2FyobKm2jkd3qn95Sukj0s%2FSlack_OAuth_05.png?alt=media\&token=2bd32840-58c7-453e-8b2e-1d75a2a383fe)

**STEP 12:** Click **\[Allow]** in the pop-up to connect your Slack account to iMBrace.

![](https://3400071099-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FypCKq44Psaly6khgrY7x%2Fuploads%2FuFh7cB4Mv2XmrJH8KetJ%2FSlack_OAuth_12.png?alt=media\&token=9f9dc0b5-fd9b-462b-9812-9df5208dc31b)

**STEP 13:** On the Slack API page, go to **\[OAuth & Permissions]** in the left side-bar. In the **OAuth Tokens for Your Workspace** section, click **\[Install to Workspace]**.

![](https://3400071099-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FypCKq44Psaly6khgrY7x%2Fuploads%2Fi2Vkc8oSnfFVv6TQp7vB%2F19.png?alt=media)

**STEP 14:** Click on the **\[Allow]** button.

![](https://3400071099-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FypCKq44Psaly6khgrY7x%2Fuploads%2FaG9xW8MgzV36n1yCmutp%2FSlack_OAuth_15.png?alt=media\&token=aaa913ac-5ef7-42fd-8a9d-451f415c6267)

**DONE:** The credential can then be used for Slack nodes.

## Account integration using Access Token

To begin, you will need:

* An [Slack](https://slack.com/) account.

**STEP 1:** Go to the [Slack API page](https://api.slack.com/), then in the top-right corner, go to **\[Your apps]**.

<figure><img src="https://3400071099-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FypCKq44Psaly6khgrY7x%2Fuploads%2F6f8nD3Q5gTDCJ8dfz7Uv%2FSlack_OAuth_1.png?alt=media&#x26;token=50df367e-e100-49fd-92b7-9359702bfd2b" alt=""><figcaption></figcaption></figure>

**STEP 2:** Go to **\[Create New App] > \[From scratch]**.

<figure><img src="https://3400071099-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FypCKq44Psaly6khgrY7x%2Fuploads%2FzmVc4xW5nsY7WKx61zyH%2FSlack_OAuth_2a.png?alt=media&#x26;token=46bb3b07-5aaf-4b5c-9c91-ee77c5dd476d" alt=""><figcaption></figcaption></figure>

<figure><img src="https://3400071099-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FypCKq44Psaly6khgrY7x%2Fuploads%2F39y69ZuXzYPQVc2Eivl2%2FSlack_OAuth_2b.png?alt=media&#x26;token=64f49f7a-a0e2-4f9f-9bae-3eedd576388c" alt=""><figcaption></figcaption></figure>

**STEP 3:** Enter an **App Name** and select the **workspace** the credential will be associated with, then click **\[Create App]**.

<figure><img src="https://3400071099-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FypCKq44Psaly6khgrY7x%2Fuploads%2FJHeQTBurvxrcmmBAtyKB%2FSlack_OAuth_3.png?alt=media&#x26;token=9911dd5e-adbc-416c-8708-357106ddb0c6" alt=""><figcaption></figcaption></figure>

**STEP 4:** Under the **Basic Information > Add features and functionality** section, select **\[Permissions]**.

<figure><img src="https://3400071099-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FypCKq44Psaly6khgrY7x%2Fuploads%2FJTvs17QbWqiyLf1v9qSj%2Fstep8.png?alt=media&#x26;token=7cfc0a69-bfa9-494b-9f9a-1408cadffdca" alt=""><figcaption></figcaption></figure>

**STEP 5:** Scroll down to the **Scopes** section and:

* If you want your app to act on behalf of users that authorize the app, add the required scopes under the **User Token Scopes** section.
* If you're building a bot, add the required scopes under the **Bot Token Scopes** section.

<figure><img src="https://3400071099-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FypCKq44Psaly6khgrY7x%2Fuploads%2F9W5JFkxuObaQ1ZEMqvyZ%2Faccesstokenstep7.png?alt=media&#x26;token=60ae9858-3d56-451e-bae5-ade3ff9c5697" alt=""><figcaption></figcaption></figure>

**STEP 6:** From the **OAuth Tokens for Your Workspace** section click on the **Install to Workspace** button.

<figure><img src="https://3400071099-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FypCKq44Psaly6khgrY7x%2Fuploads%2FJ1UqASLv7S4wBNB19t4A%2Faccesstokenstep8.png?alt=media&#x26;token=ce29edf5-718f-4ffd-bfe1-d9fd6fd7baf1" alt=""><figcaption></figcaption></figure>

**STEP 7:** Click on the **\[Allow]** button.

<figure><img src="https://3400071099-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FypCKq44Psaly6khgrY7x%2Fuploads%2FaG9xW8MgzV36n1yCmutp%2FSlack_OAuth_15.png?alt=media&#x26;token=aaa913ac-5ef7-42fd-8a9d-451f415c6267" alt=""><figcaption></figcaption></figure>

**STEP 8:** In the left side-bar, go to **OAuth & Permissions > OAuth Tokens for Your Workspace**, and copy the relevant token for your use.

<figure><img src="https://3400071099-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FypCKq44Psaly6khgrY7x%2Fuploads%2FwhobECKOD3hIvbhIEGvH%2FSlack_Token_08.png?alt=media&#x26;token=2cc82a4b-b1a2-47cb-ac9f-2134a5f57e93" alt=""><figcaption></figcaption></figure>

**STEP 9:** In iMBrace, create a credential of type **Slack API**, paste the copied token from Slack into the **Access Token** field, then click the **\[Create]** button.

<figure><img src="https://3400071099-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FypCKq44Psaly6khgrY7x%2Fuploads%2FifyKRHokPmcytmxOxO8F%2Faccesstokenstep10.png?alt=media&#x26;token=db42daf6-720f-40ab-afea-5f25128519c0" alt=""><figcaption></figcaption></figure>

**DONE:** The credential can then be used for Slack nodes.
