Matrix Slack Puppeting Bridge
100K+
This is a slack puppeting bridge for matrix. It is based on mx-puppet-bridge and provide multi-user instances.
Docker image can be found at https://hub.docker.com/r/sorunome/mx-puppet-slack
For docker you probably want the following changes in config.yaml:
bindAddress: '0.0.0.0'
filename: '/data/database.db'
file: '/data/bridge.log'
Also check the config for other values, like your homeserver domain.
git clone https://github.com/Sorunome/mx-puppet-slack.git
cd mx-puppet-slack
npm install
cp sample.config.yaml config.yaml
# fill info about your homeserver and Slack app credentials to config.yaml manually
npm run start -- -r # generate registration file
app_service_config_files: in your synapse config.npm run start
@_slackpuppet_bot:domain.tld unless you changed the config).
(Give it some time after the invite, it'll join after a minute maybe.)link MYTOKEN (see below for details)
help)
list
Get a legacy token from https://api.slack.com/custom-integrations/legacy-tokens and then chat with the bot user (@_slackpuppet_bot:domain.tld unless you changed the config):
link <token>
To use OAuth
oauth block in your config.yaml file. Be sure to forward the oauth.redirectUri to the bridge.@_slackpuppet_bot:domain.tld unless you changed the config)linklink TOKEN_YOU_COPIEDWarning:: Linking your xoxs account's token is against Slack's Terms of Service.
First you must retrieve your xoxs token: Go to your slack customization page, e.g. https://my.slack.com/customize, and then open the debugging console
(F12 or rightclick --> inspect element).
Get the token by entering TS.boot_data.api_token.
After that, run:
link <token>
Warning: Linking your xoxc account's token is against Slack's Terms of Service.
First you must retrieve your xoxc token: In the network manager, filter for type WS/WebSocket, and the xoxc token is there as URL parameter of that request.
Next you will need to get the contents of your d cookie.
After that, run:
link <token> <d cookie contents>
It is also possible to use mx-puppet-slack as a relay. For that, the events API needs to be configured. in slack.path you can configure the base-path for the various new endpoints. By default this is /_matrix/slack/client.
The events API will have appended /events, so by default /_matrix/slack/client/events.
The new oauth endpoint to add the slack bot to new teams has /oauth/{appId} appended, so by default /_matrix/slack/client/events/{appId}.
Create your slack app, give it the permissions and then link it with link <appId> <clientId> <clientSecret> <signingSecret>. Don't forget to settype <puppetId> relay!
Content type
Image
Digest
Size
70.4 MB
Last updated
about 5 years ago
docker pull sorunome/mx-puppet-slack