---
title: Create a Slack OAuth app for OpenConnector
description: Create a Slack app, configure OAuth redirect URLs and scopes, then
  connect Slack to a self-hosted OOMOL OpenConnector runtime.
lang: en
canonical_url: https://oomol.com/en/docs/openconnector-slack-oauth-app/
markdown_url: https://oomol.com/en/docs/openconnector-slack-oauth-app.md
---

# Create a Slack OAuth app for OpenConnector

Use a Slack OAuth app when OpenConnector needs to read Slack conversations, list users, send messages, upload files, or manage reactions through the `slack` service.

## OpenConnector service

| Service ID | Provider | Auth type |
| --- | --- | --- |
| `slack` | Slack | OAuth2 |

OpenConnector's Slack provider uses Slack OAuth v2 and requests Slack scopes such as `channels:read`, `groups:read`, `im:read`, `mpim:read`, history scopes, file scopes, `users:read`, `chat:write`, `im:write`, and reaction scopes.

## Prerequisites

- A running OpenConnector runtime.
- Permission to create or manage a Slack app for the target workspace.
- Permission to install apps in the Slack workspace, or access to a workspace owner/admin who can approve installation.
- The OpenConnector origin users open in the browser, such as `http://localhost:3000` or `https://connect.example.com`.

## Step 1: Set the OpenConnector callback URL

Build the callback URL by appending `/oauth/callback` to your OpenConnector origin.

For local testing, use `http://localhost:3000/oauth/callback`. If Slack does not accept your local callback URL, expose OpenConnector through an HTTPS tunnel or public domain, set `OOMOL_CONNECT_ORIGIN`, restart, and use the public callback URL, such as `https://connect.example.com/oauth/callback`.

## Step 2: Create a Slack app

In [Slack API app management](https://api.slack.com/apps):

1. Create a new app.
2. Choose the workspace you want to develop or test in.
3. Open **OAuth & Permissions**.
4. Add the exact OpenConnector callback URL under redirect URLs.
5. Add the bot token scopes needed by your OpenConnector actions.
6. Save the app settings.

Slack's OAuth overview is [Installing with OAuth](https://docs.slack.dev/authentication/installing-with-oauth), and Slack's scope reference is [Scopes](https://docs.slack.dev/reference/scopes).

## Step 3: Copy the client credentials

Open **Basic Information** for the Slack app and copy:

| Slack value | OpenConnector field |
| --- | --- |
| Client ID | `clientId` |
| Client Secret | `clientSecret` |

Do not use the bot token as the OAuth client secret. OpenConnector starts the OAuth flow and stores the resulting Slack credential after authorization.

## Step 4: Save the Slack client in OpenConnector

Use the OpenConnector web console:

1. Open the OpenConnector web console, such as `http://localhost:3000`.
2. Open **Providers** and select **Slack**.
3. Choose **Configure OAuth Client** or **Edit OAuth Client**.
4. Paste the Slack client ID and client secret.
5. Choose **Save OAuth Client**.

## Step 5: Connect and test

After saving the OAuth client, choose **Connect** on the Slack provider page. Choose the Slack workspace, approve the app, return to OpenConnector, and confirm that the provider page shows the workspace as connected.

Low-risk test actions include `slack.list_conversations`, `slack.list_channels`, and `slack.list_users`.

## Troubleshooting

| Symptom | What to check |
| --- | --- |
| Slack rejects the redirect URL | Confirm the Slack redirect URL is `<openconnector-origin>/oauth/callback`. If Slack requires HTTPS for your setup, use an HTTPS public origin and set `OOMOL_CONNECT_ORIGIN`. |
| The app cannot be installed | Ask a Slack workspace owner or admin to approve the app if the workspace restricts app installation. |
| Channels are missing | Public and private channel visibility depends on scopes, Slack workspace policy, and whether the app has access to the channel. Invite the app to private channels when needed. |
| Message actions fail | Confirm the app has write scopes such as `chat:write` and can access the target conversation. |
| Scope changes do not apply | Reinstall or reconnect Slack after changing scopes so the connected credential receives the new permissions. |
