-
Notifications
You must be signed in to change notification settings - Fork 13
Install Slack Bot
shayaantx edited this page Feb 21, 2021
·
7 revisions
- Existing slack workspace (google how to set one up)
Installing the slack bot has a few quirks. Since we use RTM (real time messaging api) we have to use the "bot" scope which is a legacy item in slack nowadays.
We make use of two slack tokens: the bot and user token. The bot token is mostly so we can achieve RTM functionality and the user token is needed to access message data that the RTM functionality doesn't expose (specifically looking up private/public channel messages)
Installing through slack is done through a custom url via slack apps.
- Start by going here https://api.slack.com/apps?new_classic_app=1 You will see the below screenshot
- You should see redirected to the basic information page.
- Next click the "Bots" link
- This should show you the legacy bots screen where you can click "Add Legacy Bot User", since jslack/rtm functionality needs the "bot" scope, which you can only get this way (you can not get it as far as I know by manually updating scopes).
- Once you've added the legacy bot scope, click the "OAuth & Permissions" under "Features" in the left side menu.
- Next we need to add additional scopes for the user token: channels:history, groups:history, reactions:read
- Next we need to install the application, Under "Settings" click "Install app" or you can get there from Settings->Basic Information->Install App
- You should see "OAuth Access Token" and "Bot User OAuth Access Token" available for your workspace. Save both tokens (you will need them later to populate the properties: slack-bot-token, slack-user-token)
- Once you've installed the app to your workspace, go to workspace, and pick the channel(s) you plan on configuring botdarr for and @ your bot in that channel (which will invite the bot to the channel). WITHOUT this step, botdarr will fail to send messages and receive messages.