Skip to main content

Prepare Slack connector

note

This connector is currently available in beta.

The Slack connector retrieves information about subscriptions, users, and user activity. In the Slack workspace, you are required to create an app, copy the Client ID and Client Secret, create a Refresh Token, and enter the values in Settings when adding the connector.

Prerequisites

An admin user account based on the type of Slack edition you have, with the minimum Slack API permissions as described in Step 8.

Currently, we support creating apps for any of these Slack editions:

  • Free

  • Pro

  • Business+

  • Enterprise Grid

  • Compliance

Procedure

  1. Sign in to your Slack workspace based on the type of Slack edition you have. https://slack.com/signin#/signin

  2. From your home page, in the sidebar menu, select Configure apps.

  3. In the window that opens, on the top-right, select Build.

  4. In Your Apps, select Create New App.

  5. Select and enter details for the app type and then create the app.

  6. Go to your app and in the sidebar menu, select OAuth & Permissions.

  7. Scroll down to the User Token Scopes in the Scopes section.

  8. Select Add an OAuth Scope and add the scopes as below:

    1. If you are using a Slack enterprise edition:

      • Add the User Scopes for admin, users:read, team:read, users:read.email, admin.users:read, admin.analytics:read, and team.billing:read.

      • Add the Bot Scopes for bookmarks:read.

    2. If you are using any of the Slack non-enterprise editions:

      • Add the User Scopes for admin, users:read, and team.billing:read.

      • Add the Bot Scopes for bookmarks:read.

  9. Go to the Basic Information tab and copy and save the values of Client ID and Client Secret.

    The values are used in the following steps, and when adding the connector in Step 15.

  10. Go back to the OAuth & Permissions tab.

  11. In Redirect URLs, select Add New Redirect URL.

  12. Enter for example, https://localhost and select Save URLs.

  13. Generate an authorization code:

    1. Build an authorization URL to request the user authentication.

      EXAMPLE
      https://slack.com/oauth/v2/authorize?client_id=<YOUR_CLIENT_ID>>&scope=<SCOPES>&user_scope=<USER_SCOPES>&redirect_uri=<REDIRECT_URI>&state=<STATE>&tracked=1
    2. Replace the parameters in the URL with the values below.

      ParameterValue
      YOUR_CLIENT_IDThe client ID you copied and saved according to Step 9.
      SCOPESbookmarks:read
      USER_SCOPESFor Enterprise edition:
      admin, users:read.email, admin.users:read, team:read, team.billing:read, users:read, admin.analytics:read
      For Non-Enterprise edition:
      admin, team.billing:read, users:read
      REDIRECT_URIThe redirect URI that you entered according to Steps 11 to 12.
      STATEEnter a unique and unguessable string. The state parameter is a security feature that mitigates the risk of the authorization flow being hijacked.
      tracked=1Optional: tracking parameter for logging.
    3. Enter the built URL in your browser. Slack redirects you to the specified redirect_uri and includes an authorization code in the URL.

    4. Copy and save the code parameter.

  14. Generate a refresh token using OAuth 2.0 in Postman:

    1. Make a POST request to the Slack API and replace the data parameters in the cURL with the values in the table below.

      curl --request POST 'https://slack.com/api/oauth.v2.access' \
      -H 'content-type: application/x-www-form-urlencoded' \
      -d 'client_id={YOUR_CLIENT_ID}' \
      -d 'client_secret={YOUR_CLIENT_SECRET}' \
      -d 'redirect_uri={REDIRECT_URI}' \
      -d 'code={CODE}'
      ParameterValue
      {YOUR_CLIENT_ID}The client ID you copied and saved according to Step 9.
      {YOUR_CLIENT_SECRET}The client secret you copied and saved according to Step 9.
      {REDIRECT_URI}The redirect URI that you entered according to Steps 11 to 12.
      {CODE}The authorization code parameter that you obtained in Step 13.iv.
    2. From the generated API response code, under authed_user, copy and save the value of the refresh_token. It will be used when adding the connector.

  15. When adding the connector in Snow Atlas, in Settings, enter the saved values in Client Id, Client Secret, and Refresh Token.

After completing this task, follow the general procedure to Add connectors.

The connector makes API calls to the vendor and retrieves data. For more information, see API calls and Data retrieved by the connector.


Flexera does not own the third party trademarks, software, products, or tools (collectively, the "Third Party Products") referenced herein. Third Party Product updates, including user interface updates, may not be reflected in this content.