Skip to content

API Token

To be able to access the Slack API token and use the features of this plugin, you must first create an app in the desired workspace, as shown in the steps below.

Setting up a Slack app

1. Create App

The first step is to create a slack app through this link.

When selecting the create new app option, you will be prompted to provide a name for the new app and a workspace to link to it, as below.

2. Add Scopes in the app

The second step is add scopes to the app.

Scopes give your app permission to do things (for example, post messages) in Slack. They're an essential component of any functional Slack app.

To choose the scopes to add to your app:

  • Head over to app config page for your app.
  • Navigate to the OAuth & Permissions page.
  • Scroll down to the Bot Token Scopes section.
  • Click Add an OAuth Scope.
  • Add the scopes.

See below the required scopes for each method, and note that they are the same as added above

Method Required
send message chat:write, users:read
send simple message chat:write, users:read
update message chat:write, users:read
delete message chat:write, users:read
upload file files:write
delete file files:write

Attention

In some cases, depending on your workspace permissions, you will need to add other scopes. But don't worry, the API will respond with the required scopes for interaction.

3. Workspace permission

The third step is install OAuth tokens in your workspace and allow scopes to be used in your app.

Still in OAuth & Permissions page, scroll up to OAuth Tokens for Your Workspace and click in "install to Workspace", look this below:

After this procedure, slack asks for permission to access your workspace allowing you to use the scopes you added earlier.

4. Take your access token

When you finish the permissions, slack automatically returns to the OAuth & Permissions page, and it is now possible to view and use your token:

Now, with the app created and token in hand, just link the app to the channel you want to interact with, as below.

Using your new app

Copy your token from step 4 above and use it as a parameter in BotPluginSlack.