Authentication
You may want to use mautrix-manager instead of bot commands if you want to do token login. It will automate extracting cookies so you don't need to mess with browser devtools.
- Open a private chat with the bridge bot. Usually
@slackbot:your.server
.- If the bot doesn't accept the invite, see the troubleshooting page
Token login
- Login to the Slack web app in a browser, and acquire the authentication
token and
d
cookie from inside the app.- The token starts with
xoxc-
and can be found using the browser devtools, in localStorage inside thelocalConfig_v2
object:JSON.parse(localStorage.localConfig_v2).teams.YOUR_TEAM_ID_HERE.token
- The cookie is named
d
and starts withxoxd-
.
- The token starts with
- Send
login token <token> <cookie>
to the bot.
After login, the bridge will bridge recent chats automatically
(depending on the conversation_count
setting).
App login
If using app login for relay mode, it is recommended to create a new Matrix account. If you do this with your primary account, your messages will be bridged with the app's profile rather than a custom profile.
- Create a new Slack app using the app manifest in the bridge repo.
- Create an app-level token for the app to get a
xapp-
token. - Install the app in your workspace to get a
xoxb-
token. - Send
login app
to the bot. - Send the bot token and app-level token when requested.
After login, the bridge will bridge the chats the bot is in automatically.
If using set-relay
, any unauthenticated users will be bridged through the app
with a custom name & avatar. Note that the user who did login app
will not
get a custom name and avatar (hence the recommendation for a dedicated Matrix
account at the start).