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:
In your app settings, go to OAuth & Permissions
In the Redirect URLs section click Add a New Redirect URL.
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.
In your app settings, go to the Scopes section, under OAuth & Permissions.
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:
In your app settings, click Manage Distribution under the Settings section.
Complete the procedures to set a callback URL and configure permissions.
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:
Extracts the access token from the callback URL and authenticates requests.
Refreshes the access token when it expires.
Saves OAuth values in OAuthSettingsLocation to be persisted across connections.
Last updated