Authentication
- Open a private chat with the bridge bot. Usually
@gmessagesbot:your.server
- If the bot doesn't accept the invite, see the troubleshooting page
QR login
This is the recommended method, as it's much easier to set up. If you switched to Google account pairing, you can switch back by unpairing all devices and then clicking the switch to QR pairing button that appears.
- Send
login qr
to start the login. - Log in by scanning the QR code. If the code expires before you scan it, the
bridge will send an error to notify you.
- On your phone, open Messages by Google.
- Tap Menu from your conversation list and select Device pairing.
- Tap QR code scanner and point your phone at the image sent by the bot.
- Finally, the bot should inform you of a successful login.
- The bridge will create portal rooms for recent chats. The number is configurable and defaults to 25 chats with 50 messages backfilled in each chat.
As all messages are proxied through the app, your phone must be connected to the internet for the bridge to work.
Google account login
New in version 0.3.0
This method is available as a fallback, it's not recommended since it's more difficult. This method still proxies everything through your phone, it just pairs in a different way.
You may want to use mautrix-manager instead of bot commands if you want to do Google login. It will automate extracting cookies so you don't need to mess with browser devtools.
Note that Google Fi's "sync to your Google Account" option is not supported by the bridge even with Google account login. You must choose the normal mode where RCS chats are available (option 1 in https://support.google.com/fi/answer/6188337).
- Send
login google
to start the login. - Log into https://accounts.google.com/AccountChooser?continue=https://messages.google.com/web/config
with your Google account.
- Using a private window is recommended to ensure the cookies don't get rotated by the bridge, and because the bridge doesn't support cookies linked to multiple accounts.
- The
continue
URL in the link is chosen so that it would only log into your Google account and not try to pair the browser.
- Make a key-value JSON object containing at least the
SID
,HSID
,SSID
,OSID
,APISID
andSAPISID
cookies. Sometimes Google also requires__Secure-1PSIDTS
to be included. Alternatively, you can copy a request with the cookies as cURL from the network tab and paste that to the bot. - Send the JSON object to the bot.
- Open Google Messages on your phone and tap on the emoji the bridge bot sent.
- Finally, the bot should inform you of a successful login.
Logging out
Simply run the logout
management command.