Guides / Authentication
Installing with OAuth
Slack apps are installed with OAuth 2.0. Installing your app into a workspace asks someone there to approve the scopes it needs, and gives you an access token to call the Web API with.
Asking for scopes
Scopes decide what your app can do. Ask for as few as it needs: an app that only posts messages needs chat:write.
# manifest.yml oauth_config: scopes: bot: - chat:write - chat:write.public - im:write
Installing the app
On your app's OAuth & Permissions page, press Install to Workspace. Slack shows what the app is asking for, and someone in the workspace presses Allow.
Bot tokens
xoxb-. Keep it secret: anyone with it can post as your app.POST https://slack.com/api/chat.postMessage Authorization: Bearer xoxb-your-token Content-type: application/json { "channel": "#sales", "blocks": [ … ] }
Buttons that do something
When someone presses a button in your app's message, Slack sends it to your Request URL. Check every request with your app's Signing Secret, found under Basic Information, and answer within 3 seconds.


