Slack Generic OAuth2 User Token Account

Slack Generic OAuth2 User Token Account

In this article

Overview

Use this account type to connect Slack Snaps with data sources that use Slack Generic OAuth2 authentication, and then to perform the operations that Slack allows for your User Token account.

Prerequisites

Limitations

Do not use this account type to create a Bot Token Account for ease and convenience of working with Slack users and teams.

Known Issues

None.

Account Settings

To create your Slack Generic OAuth2 account in SnapLogic, you must create an application as per the application provider's instructions in Start building Slack apps to generate and supply Client IDClient secretOAuth2 endpoint, and OAuth2 token in the settings below and click Authorize. SnapLogic sends your account details to the OAuth2 endpoint specified and populates the Access tokenRefresh token, and Access token expiration fields based on the details received from the endpoint.

slack-oauth-user-token.png

 

Parameter

Data Type

Description

Default Value

Example 

Parameter

Data Type

Description

Default Value

Example 

Label

String

Required. Enter a unique label for the account.

N/A

Slack_OAuth2_UserToken

Client ID

String

RequiredEnter the client ID associated with your Slack application. You can create the client ID as advised by your application provider.

N/A

1394786838725.1307264331815

Client secret

String

Enter the client secret associated with your account. You can create the client secret as advised by your application provider.

N/A

bec1f9242f9nsh67f2276b9ws4cadd14

Access token

String

Auto-generated after authorization. The access token associated with the Slack application is used to make API requests on behalf of the user associated with the client ID.

N/A

N/A

Refresh token

String

Auto-generated after authorization. The refresh token retrieval for the application is specified when setting up the account for the endpoint. There, the OAuth2 flow is executed and the resulting refresh token is stored in this field. If the refresh token is stored, then the access token is refreshed automatically before it expires.

N/A

N/A

Access token expiration

Integer

Auto-generated after authorization. The access token expiration value in Epoch time.

N/A

N/A

Header authenticated

Check box

Enable this if endpoint uses bearer header authentication.

Not selected

Selected

OAuth2 authorization endpoint

String

RequiredEnter the OAuth2 endpoint authorization URL to authorize the application.

https://slack.com/oauth/
v2/authorize

https://slack.com/oauth/
v2/authorize

OAuth2 token endpoint

String

Required. Enter the Token endpoint to get the access token.

https://slack.com/api/
oauth.v2.access

https://slack.com/api/
oauth.v2.access

Token endpoint config

Use this field set to configure token endpoint parameters as necessary for the account.

This field set comprises the following fields:

  • Token endpoint parameter

  • Token endpoint parameter value

Specify each parameter in a separate row. Click 

 to add a new row.

Token endpoint parameter

String

Provide the name for the token endpoint parameter.

N/A

user_scope

Token endpoint parameter value

String

Provide the value for the parameter.

N/A

users: read

Authorization endpoint config

Use this field set to assign scopes for the OAuth2 Authentication endpoint for the user account. This field set comprises the following fields: 

  • Authentication parameter

  • Authentication parameter value

Specify each parameter in a separate row. Click 

 to add a new row.

We recommend that you define both user_scope and scope entries in the field set. 

Authentication parameter

String

Provide the name for an authentication parameter.

N/A

user_scope
scope

Authentication parameter value

String

Provide the value for the parameter. See the Scope and Permissions article in Slack API documentation for the complete list.

N/A

files:write

Auto-refresh token

Check box

Do not select this check box as Slack (bot/user) tokens do not expire, and hence, need not be refreshed.

Access Tokens

If you have an Enterprise Admin account, you can set an expiry duration for your app's user token. 

See Revoke All OAuth Tokens to know about revoking all your OAuth tokens, if need be.

Not selected

Not selected

Authorize

Button

Click this button to acquire the required permissions for this account from the Slack app, when creating an account.

For existing accounts, you can click this button to re-acquire the permissions (Access tokenRefresh token and Access token expirationto ensure that the account works as expected. This action does not require or result in any changes to the Access Token that is already generated.

N/A

N/A