A replacement prpl for Google Chat in Pidgin/libpurple to support the proprietary protocol that Google uses for its "Google Chat" service.
This plugin is written by Eion Robb based on the old Hangouts plugin written by Eion Robb and Mike 'Maiku' Ruprecht.
To compile, just do the standard make && sudo make install dance. You'll need development packages for libpurple, libjson-glib, glib and libprotobuf-c to be able to compile.
Run the following commands from a terminal
#!sh
sudo apt-get install -y libpurple-dev libjson-glib-dev libglib2.0-dev libprotobuf-c-dev protobuf-c-compiler git make;
git clone https://github.com/EionRobb/purple-googlechat/ && cd purple-googlechat;
make && sudo make installjson-glib-devel libpurple-devel glib2-devel libpurple-devel protobuf-c-devel protobuf-c-compilerThe easiest way to install is using the Windows installer (purple-googlechat.msi) available from the latest release. This automatically installs the plugin, required dependency DLLs, and protocol icons into Pidgin.
Alternatively, for manual installation:
- Download
libgooglechat.dllfrom the latest release and copy it into yourC:\Program Files (x86)\Pidgin\pluginsfolder. - Download libprotobuf-c-1.dll and libjson-glib-1.0.dll and copy them into your
C:\Program Files (x86)\Pidginfolder (not thepluginssubfolder). - (Optional) Copy the protocol icons into your pixmaps folder:
- googlechat16.png to
C:\Program Files (x86)\Pidgin\pixmaps\pidgin\protocols\16\googlechat.png - googlechat22.png to
C:\Program Files (x86)\Pidgin\pixmaps\pidgin\protocols\22\googlechat.png - googlechat48.png to
C:\Program Files (x86)\Pidgin\pixmaps\pidgin\protocols\48\googlechat.png
- googlechat16.png to
The plugin uses cookies from a logged in browser to authenticate
- Open https://chat.google.com/ in a private/incognito browser window and log in normally
- Press F12 to open developer tools.
- Select the "Application" (Chrome) or "Storage" (Firefox) tab.
- In the sidebar, expand "Cookies" and select https://chat.google.com.
- In the cookie list, find the COMPASS, SSID, SID, OSID and HSID rows.
- When using Firefox, you may have multiple COMPASS cookies with different paths. Pick the one where path is /.
- Paste the value of each cookie into the 'Advanced' tab of the account:

- Close the browser window to prevent the cookies being invalidated
There's also a handy extension mautrix/googlechat#93 (comment)
- Firefox: addons.mozilla.org/en-US/firefox/addon/gchat-login-cookie-generator and
- Chromium based browsers: chrome.google.com/webstore/detail/matrix-gchat-bridge-login/mofmfbkepponmdchhamalbcldoajbmho
You may also need to use a fresh "Guest Profile" in Chrome if the above doesn't work
Grab the cookie values as above, then set them with
account <account id> set COMPASS_token <value>
account <account id> set SSID_token <value>
account <account id> set SID_token <value>
account <account id> set OSID_token <value>
account <account id> set HSID_token <value>
Set the password on the account manually in the format
COMPASS=<value>&SSID=<value>&SID=<value>&OSID=<value>&HSID=<value>
(making sure not to encode = in the value as %3D)
Say "Thanks" by buying me a coffee