mirror of
https://github.com/42wim/matterbridge.git
synced 2024-11-15 00:19:24 +01:00
Added the setup guide for the new Slack integration
parent
4e59179af6
commit
775c3324c4
@ -1,7 +1,56 @@
|
||||
:warning: First create a dedicated user (a new account specifically for the bot) in slack.
|
||||
# A Matterbridge integration for your Slack Workspace
|
||||
Slack's model for bot users and other third-party integrations revolves around Slack Apps. They have been around for a while and are the only and default way of integrating services like Matterbridge going forward.
|
||||
|
||||
Then log in as this user and go to [here](https://api.slack.com/custom-integrations/legacy-tokens) and click "Create token" for your team and your new user.
|
||||
## Create the Slack App
|
||||
1. Navigate to [your Apps page](https://api.slack.com/apps). You'll need to be logged in with an account that has administrative permissions over the Slack Workspace (server) that you want to sync with Matterbridge.
|
||||
|
||||
![Create token screen](https://i.snag.gy/vpsSM4.jpg)
|
||||
2. Click on the `Create App` button and fill in the app's name and select the right Slack Workspace before validating.
|
||||
|
||||
The token will look something like ```xoxp-123456789-LowerAndUPpercase```
|
||||
3. Navigate to the `Bot Users` page via the menu on the left side of the page. Click on the `Add a Bot User`, fill in the bot's details and validate to create the required bot.
|
||||
|
||||
|
||||
## Grant scopes and install the Slack App
|
||||
|
||||
Now that we have a bot we need to give your new Slack App (and thus the bot) the right permissions on your Slack Workspace.
|
||||
|
||||
1. Via the menu on the left side of the page navigate to the `OAuth & Permissions` page and scroll down to the `Scopes` section.
|
||||
|
||||
2. Successively add the following permission scopes to your app:
|
||||
* Modify your public channels (`channels:write`)
|
||||
* Send messages as <App name> (`chat:write:bot`)
|
||||
* Send messages as user (`chat:write:user`)
|
||||
Click on the `Save changes` button below the scopes once all scopes have been added.
|
||||
|
||||
3. Scroll to the top of the same `OAuth & Permissions` page and click on the `Install App` (or `Reinstall App`) button. This will give a pop-up menu summarising the permission scopes that you just added and will ask for your confirmation to add the new App with its bot to your Workspace.
|
||||
|
||||
|
||||
## Invite the bot to channels synced with Matterbridge
|
||||
|
||||
The only thing that remains now is to set up the newly created bot on the Slack Workspace itself.
|
||||
|
||||
1. On your Slack server you need to add the newly created bot to the relevant channels. Simply use the `/invite @<botname>` command in the chatbox.
|
||||
|
||||
2. Repeat the invite process for each channel that Matterbridge needs to sync.
|
||||
|
||||
|
||||
# Legacy setup
|
||||
|
||||
🛑 This setup is not recommended and will disappear in future versions of Matterbridge. Please use it only if you are absolutely sure that you can not use the normal setup. Legacy tokens are, as their name indicates, a legacy feature and Slack can in the future **deprecate them at short notice** as they have a weak security model and **give access to a wide-range of privileged actions**. Always store your token securely!
|
||||
|
||||
***
|
||||
|
||||
In order to use this setup your channel configuration should use the `slack-legacy` setup instead of `slack`:
|
||||
```toml
|
||||
[slack-legacy]
|
||||
[slack-legacy.myslack]
|
||||
Token="xoxp-123456789-mytoken"
|
||||
```
|
||||
|
||||
Steps to follow:
|
||||
1. First create a dedicated user (a new account specifically for the bot) in Slack.
|
||||
|
||||
2. Next log in as this user and go to [the legacy tokens page](https://api.slack.com/custom-integrations/legacy-tokens) and click "Create token" for your team and your new user.
|
||||
![Create token screen](https://i.snag.gy/vpsSM4.jpg)
|
||||
The token will look something like ```xoxp-123456789-LowerAndUPpercase```.
|
||||
|
||||
3. Use the obtained token in your configuration file for the channel setup as in the example above.
|
Loading…
Reference in New Issue
Block a user