Slack

Slack uses the OAuth authentication standard. To authenticate using OAuth, you will need to create an app to obtain the OAuthClientId, OAuthClientSecret, and CallbackURL connection properties.

Create an app to obtain the OAuth client credentials, the OAuthClientId and OAuthClientSecret. To create your app, go to https://api.slack.com/apps. Specify an app name and the app's workspace. You can see the Client Id and Client Secret listed in the App Credentials section under Basic information.

Set a Callback URL

After creating your application, define your app's CallbackURL:

  1. In your app settings, go to OAuth & Permissions

  2. In the Redirect URLs section click Add a New Redirect URL.

  3. Set the callback URL to http://127.0.0.1:33333, or another port of your choice. Ensure that you save the URL.

Configure Permission Scopes

Follow the instructions below to configure the API permissions your app requests. In order to use all possible features, the necessary scopes are: channels:read, groups:read, im:read, mpim:read, channels:write, groups:write, im:write, mpim:write, channels:history, groups:history, im:history, mpim:history, search:read, chat:write:user, chat:write:bot, files:read, files:write:user, pins:read, pins:write, usergroups:read, usergroups:write, reminders:read, reminders:write, users:read, users.profile:write.

  1. In your app settings, go to the Scopes section, under OAuth & Permissions.

  2. In the Select Permission Scopes subsection, click the menu to add permissions by scope or API method.

Distribute Your App

To allow users in other workspaces to install your app, follow the instructions below:

  1. In your app settings, click Manage Distribution under the Settings section.

  2. Complete the procedures to set a callback URL and configure permissions.

  3. Click Activate Public Distribution.

Set the following connection properties to connect:

  • InitiateOAuth: Set this to GETANDREFRESH. You can use InitiateOAuth to avoid repeating the OAuth exchange and manually setting the access token in the connection string.

  • OAuthClientId: Set this to the Client Id in your app settings.

  • OAuthClientSecret: Set this to the Client Secret in your app settings.

  • CallbackURL: Set this to the Redirect URL in your app settings.

When you connect the provider opens the OAuth endpoint in your default browser. Log in and grant permissions to the application. The provider then completes the OAuth process:

  1. Extracts the access token from the callback URL and authenticates requests.

  2. Refreshes the access token when it expires.

  3. Saves OAuth values in OAuthSettingsLocation to be persisted across connections.

Last updated