Search code examples
tokenaccess-tokenslack-apibearer-token

Slack App, token for Web API


For our Slack workspace I am building an app that will use the Web API to send and update messages.

However, while the app is installed in our workspace I cannot find the token needed to authenticate my Web API requests.

How can I authenticate an App to the Web API ?

Thanks


Solution

  • There are two ways to get a token for the Slack API.

    1. You can install your app within the admin window for your app (under "Oauth & Permissions"). This will create a token that you then can access directly (e.g. copy & paste to your app). Note that this only works if you plan to use your app within you own workspace only.

    2. You can implement an installation process using OAuth 2.0. During installation to a workspace your app will receive the newly created token from the API, which you should store for later use. This works with any Slack workspace, not just your own.