the first third-party instant messaging client for Google Hangouts

Overview

hangups

CI Status Documentation Status Snap Status

hangups is the first third-party instant messaging client for Google Hangouts. It includes both a Python library and a reference client with a text-based user interface.

Unlike its predecessor Google Talk, Hangouts uses a proprietary, non-interoperable protocol. hangups is implemented by reverse-engineering this protocol, which allows it to support features like group messaging that aren't available in clients that connect via XMPP.

hangups is still in an early stage of development. The reference client is usable for basic chatting, but the API is undocumented and subject to change. Bug reports and pull requests are welcome!

hangups screenshot

Documentation

See the documentation for installation and usage instructions.

Projects using hangups

Related projects

  • Hangish: A Google Hangouts native client for Sailfish
  • Hangups-UWP: Hangups client for Universal Windows Platform
  • Parrot: The next generation messenger
  • WTalk: Client library and desktop client for Google Hangouts written in C#
  • YakYak: Desktop client for Google Hangouts
  • go-hangups: Port of hangups to Go
  • hangover: The first native Mac OS X client for Google Hangouts
  • hangups-rs: Port of hangups to Rust
  • hangupsjs: Port of hangups to Node.js
  • purple-hangouts: Hangouts plugin for libpurple
  • slangouts: A Hangouts/Slack bridge
Comments
  • Error: invalid_scope from oauth2

    Error: invalid_scope from oauth2

    Hey, I just installed Hangups and when trying to set it up, when I try to open the webpage url given by hangups I get this message : 400. That's an error Error: invalid_scope Request Details scope=https://www.google.com/accounts/OAuthLogin response_type=code redirect_uri=urn:ietf:wg:oauth:2.0:oob client_id=936475272427.apps.googleusercontent.com

    The recently used devices list by google does not show anything 'new' that could be hangouts. Am I doing something wrong? Do you need any other info? I am running Linux 4.1.31-1-MANJARO

    Any help will be much appreciated

    type-bug component-core 
    opened by BartGarciaNathan 69
  • Chat messages to Google Voice conversations don't send, but are saved in chat history

    Chat messages to Google Voice conversations don't send, but are saved in chat history

    EDIT: See below for the real issue.

    With normal hangouts conversations, it works fine, but after sending a message to a number using Google Voice integration, it doesn't show up in the chat. I've confirmed that it's actually sent using both the web interface on plus.google.com and by quitting the application, then starting it back up.

    I seem to receive the messages just fine, although I haven't yet been able to test whether my own messages show up when I receive one. I'll update as soon as I do.

    type-bug 
    opened by baskervald 44
  • Crash on start

    Crash on start

    I was working fine before, then I closed it, and when I re-started it, it crashed. And whatever I've tried (re-installing, cleaning cache,...) I can't get it to work anymore. Log can be found here: http://pastie.org/pastes/9785203/text

    type-bug 
    opened by laufersteppenwolf 29
  • MoodMessage --> MoodSetting

    MoodMessage --> MoodSetting

    Just a heads up, but this is what Presence's proto should look like:

    message Presence {
      optional bool reachable = 1;
      optional bool available = 2;
      optional DeviceStatus device_status = 6;
      optional MoodSetting mood_setting = 9;
      optional LastSeen last_seen = 10;
    }
    

    Note that MoodMessage has been changed to MoodSetting -- this is the correct result when using QueryPresenceRequest.

    type-bug component-core 
    opened by avaidyam 25
  • Stuck After Authorization

    Stuck After Authorization

    After doing the authorization, the script seems to hang with a clear screen, except "Connecting..."

    Running Ubuntu Server, but same happened on my raspberry pi. It also happened when I tried installing all three ways (Docker, Git, Python repo).

    Any ideas or is it a bug?

    type-bug component-core 
    opened by benyanke 24
  • Support for Google provided email accounts (i.e. myusername@myuniversity.edu)

    Support for Google provided email accounts (i.e. [email protected])

    I'm attempting to login with my Google-provided account. The domain-name part of the address is not gmail.com but rather my organization's domain name. Is there support for this and I'm just missing something?

    type-question 
    opened by TinfoilSubmarine 22
  • build_user_conversation_list IndexError when conversation has no events

    build_user_conversation_list IndexError when conversation has no events

    I get the following error on startup since upgrading to python 3.6. Installed via yaourt on Arch.

    $ hangups
    ...
    Traceback (most recent call last):
      File "/usr/lib/python3.6/site-packages/aiohttp/client_reqrep.py", line 568, in __del__
      File "/usr/lib/python3.6/asyncio/base_events.py", line 1290, in call_exception_handler
      File "/usr/lib/python3.6/logging/__init__.py", line 1330, in error
      File "/usr/lib/python3.6/logging/__init__.py", line 1437, in _log
      File "/usr/lib/python3.6/logging/__init__.py", line 1447, in handle
      File "/usr/lib/python3.6/logging/__init__.py", line 1509, in callHandlers
      File "/usr/lib/python3.6/logging/__init__.py", line 858, in handle
      File "/usr/lib/python3.6/logging/__init__.py", line 1064, in emit
      File "/usr/lib/python3.6/logging/__init__.py", line 1054, in _open
    NameError: name 'open' is not defined
    Exception ignored in: <bound method BaseConnector.__del__ of <aiohttp.connector.TCPConnector object at 0x7fc21910bc88>>
    Traceback (most recent call last):
      File "/usr/lib/python3.6/site-packages/aiohttp/connector.py", line 170, in __del__
      File "/usr/lib/python3.6/asyncio/base_events.py", line 1290, in call_exception_handler
      File "/usr/lib/python3.6/logging/__init__.py", line 1330, in error
      File "/usr/lib/python3.6/logging/__init__.py", line 1437, in _log
      File "/usr/lib/python3.6/logging/__init__.py", line 1447, in handle
      File "/usr/lib/python3.6/logging/__init__.py", line 1509, in callHandlers
      File "/usr/lib/python3.6/logging/__init__.py", line 858, in handle
      File "/usr/lib/python3.6/logging/__init__.py", line 1064, in emit
      File "/usr/lib/python3.6/logging/__init__.py", line 1054, in _open
    NameError: name 'open' is not defined
    
    type-bug component-core 
    opened by make-github-pseudonymous-again 16
  • Bracketed paste mode is broken when hangups-urwid is still installed

    Bracketed paste mode is broken when hangups-urwid is still installed

    For some weeks, all text pasted through the X11 buffer have been prefixed by ~200 and suffixed by ~201. It seems to be an issue with bracketed paste mode being enabled by hangups / a library and not being filtered.

    sys.stdout.write('\u001b[?2004h') would enable this mode sys.stdout.write('\u001b[?2004l') would disable this mode

    But I did not find the right place to include this.

    I have not been able to find when this "feature" has been added to hangups, I suspect that it is in November.

    type-bug component-ui 
    opened by noilhan 16
  • hangups crashes on start with problems on timestamp

    hangups crashes on start with problems on timestamp

    Here is the error message:

    Traceback (most recent call last):
      File "/usr/bin/hangups", line 9, in <module>
        load_entry_point('hangups==0.2.4', 'console_scripts', 'hangups')()
      File "/usr/lib/python3.4/site-packages/hangups/ui/__main__.py", line 699, in main
        }, COL_SCHEMES[args.col_scheme])
      File "/usr/lib/python3.4/site-packages/hangups/ui/__main__.py", line 76, in __init__
        loop.run_until_complete(self._client.connect())
      File "/usr/lib/python3.4/asyncio/base_events.py", line 268, in run_until_complete
        return future.result()
      File "/usr/lib/python3.4/asyncio/futures.py", line 277, in result
        raise self._exception
      File "/usr/lib/python3.4/asyncio/tasks.py", line 236, in _step
        result = next(coro)
      File "/usr/lib/python3.4/site-packages/hangups/client.py", line 103, in connect
        initial_data = yield from self._initialize_chat()
      File "/usr/lib/python3.4/site-packages/hangups/client.py", line 214, in _initialize_chat
        data_dict['ds:21'][0][1][4]
      File "/usr/lib/python3.4/site-packages/hangups/parsers.py", line 73, in from_timestamp
        ).replace(microsecond=(microsecond_timestamp % 1000000))
    TypeError: unsupported operand type(s) for //: 'str' and 'int'
    
    

    I have tried stuff such as doing "int(timestamp)", but the timestampo variable seems to be "", which means that "int(timestamp)" will fail also.

    It was working fine last night. Rebuilding from the latest git did not solve the problem either.

    type-bug 
    opened by StuntsPT 16
  • Use version ranges for dependencies

    Use version ranges for dependencies

    This is needed because it makes packaging easier for a distribution.

    I am a packager looking to add this client to Gentoo Linux. Unfortunately we have newer versions of some of your dependencies, so I haven't been able to test it there.

    Can you modify your setup.py as shown in this pull request? Do you know if hangups will work with the newer versions of the dependencies?

    Thanks much,

    William

    opened by williamh 14
  • Daily Limit for Unauthenticated Use Exceeded. Continued use requires signup.

    Daily Limit for Unauthenticated Use Exceeded. Continued use requires signup.

    In the middle of a conversation, hangups suddenly stopped sending messages. I figured I'd just restart it, and it'd be fine, but then it got stuck trying to connect. Turning on debug messages gave me this:

    2016-09-29 22:07:14,445 - hangups.http_utils - DEBUG - Sending request post https://clients6.google.com/chat/v1/conversations/syncrecentconversations: b'\n\x17\n\x11\x08,\x1a\rhangups-0.3.6"\x02en\x18d \x01(\x01' 2016-09-29 22:07:14,664 - hangups.http_utils - DEBUG - Received response 403 Forbidden: b'Daily Limit for Unauthenticated Use Exceeded. Continued use requires signup.' 2016-09-29 22:07:14,664 - hangups.http_utils - INFO - Request returned unexpected status: 403 Forbidden

    I tried updating to 0.4.0, tried recreating my authentication token, but with no success. From a quick search, it looks like this is a problem with something related to my Google settings, not hangups, but I want to make sure my bases are covered.

    Thanks in advance for your help.

    type-bug component-core 
    opened by sKolar42 14
  • support for spaces chats

    support for spaces chats

    Hi, when I log in I see direct messages but do not see the chat spaces chat rooms. Is there a way to interact with these? I looked all over but the naming convention is a bit vague and ubiquitous, and finding related documentation that might be relevant to this subject is difficult. Thank you!

    type-question 
    opened by BrianMusson 6
  • Google Hangouts API has been shut down

    Google Hangouts API has been shut down

    As previously announced by Google, Hangouts was shut down in November 2022. This caused hangups to stop working because the API it relies no longer unavailable. Google's replacement for Hangouts, Google Chat, is not supported by hangups.

    Thank you to all hangups contributors and users for a great 8 years!

    opened by tdryer 17
  • AttributeError: 'ConversationEventListWalker' object has no attribute 'positions'

    AttributeError: 'ConversationEventListWalker' object has no attribute 'positions'

    If I hit End during browsing conversation history I am presented with:

    Traceback (most recent call last):
      File "/usr/bin/hangups", line 33, in <module>
        sys.exit(load_entry_point('hangups==0.4.17', 'console_scripts', 'hangups')())
      File "/usr/lib/python3.10/site-packages/hangups/ui/__main__.py", line 1215, in main
        ChatUI(
      File "/usr/lib/python3.10/site-packages/hangups/ui/__main__.py", line 153, in __init__
        raise self._exception  # pylint: disable=raising-bad-type
      File "/usr/lib/python3.10/asyncio/events.py", line 80, in _run
        self._context.run(self._callback, *self._args)
      File "/usr/lib/python3.10/site-packages/urwid/raw_display.py", line 416, in <lambda>
        wrapper = lambda: self.parse_input(
      File "/usr/lib/python3.10/site-packages/urwid/raw_display.py", line 515, in parse_input
        callback(processed, processed_codes)
      File "/usr/lib/python3.10/site-packages/urwid/main_loop.py", line 412, in _update
        self.process_input(keys)
      File "/usr/lib/python3.10/site-packages/urwid/main_loop.py", line 513, in process_input
        k = self._topmost_widget.keypress(self.screen_size, k)
      File "/usr/lib/python3.10/site-packages/hangups/ui/__main__.py", line 1012, in keypress
        key = super().keypress(size, key)
      File "/usr/lib/python3.10/site-packages/hangups/ui/__main__.py", line 304, in keypress
        return super().keypress(size, key)
      File "/usr/lib/python3.10/site-packages/urwid/container.py", line 1626, in keypress
        key = self.focus.keypress(tsize, key)
      File "/usr/lib/python3.10/site-packages/urwid/container.py", line 1135, in keypress
        return self.body.keypress( (maxcol, remaining), key )
      File "/usr/lib/python3.10/site-packages/hangups/ui/__main__.py", line 923, in keypress
        return super().keypress(size, key)
      File "/usr/lib/python3.10/site-packages/hangups/ui/__main__.py", line 304, in keypress
        return super().keypress(size, key)
      File "/usr/lib/python3.10/site-packages/urwid/container.py", line 1626, in keypress
        key = self.focus.keypress(tsize, key)
      File "/usr/lib/python3.10/site-packages/hangups/ui/__main__.py", line 436, in keypress
        key = super().keypress(size, key)
      File "/usr/lib/python3.10/site-packages/hangups/ui/__main__.py", line 304, in keypress
        return super().keypress(size, key)
      File "/usr/lib/python3.10/site-packages/urwid/listbox.py", line 994, in keypress
        return actual_key(self._keypress_max_right((maxcol, maxrow)))
      File "/usr/lib/python3.10/site-packages/urwid/listbox.py", line 1004, in _keypress_max_right
        self.focus_position = next(iter(self.body.positions(reverse=True)))
    AttributeError: 'ConversationEventListWalker' object has no attribute 'positions'
    

    Arch Linux, x86_64, using latest snapshot from git

    type-bug component-ui 
    opened by jose1711 1
  • not receiving incoming messages

    not receiving incoming messages

    when starting a conversation, at some point (after a few messages) I stop receiving new messages, there is a "Loading..." on top of the screen. I have to restart the app. I can keep sending messages.

    I'm on ubuntu 20.04 with hangups 0.4.14. hang

    type-bug component-ui 
    opened by kurokirasama 3
  • Feature request: Allow to get OAuth token from environment variable

    Feature request: Allow to get OAuth token from environment variable

    I found Hangups a very useful app. Thanks for sharing. OAuth token from environment would be a nice addition. Especially for Docker usage, where you could get rid of volumes and mounts and leverage existing tooling and workflows for environment secrets.

    type-enhancement component-core 
    opened by pataquets 0
  • UnicodeDecodeError

    UnicodeDecodeError

    Can someone help with this error? This happens when I open certain chats (not with all).

    
    Traceback (most recent call last):                           
      File "/usr/local/bin/hangups", line 11, in <module>
        load_entry_point('hangups==0.4.10', 'console_scripts', 'han
    gups')()
      File "/usr/local/lib/python3.8/dist-packages/hangups-0.4.10-p
    y3.8.egg/hangups/ui/__main__.py", line 1204, in main
      File "/usr/local/lib/python3.8/dist-packages/hangups-0.4.10-p
    y3.8.egg/hangups/ui/__main__.py", line 152, in __init__
      File "/usr/lib/python3.8/asyncio/events.py", line 81, in _run
        self._context.run(self._callback, *self._args)
      File "/home/convict/.local/lib/python3.8/site-packages/urwid/
    main_loop.py", line 1289, in faux_idle_callback
        callback()
      File "/home/convict/.local/lib/python3.8/site-packages/urwid/
    main_loop.py", line 564, in entering_idle
        self.draw_screen()
      File "/home/convict/.local/lib/python3.8/site-packages/urwid/
    main_loop.py", line 579, in draw_screen
        self.screen.draw_screen(self.screen_size, canvas)
      File "/home/convict/.local/lib/python3.8/site-packages/urwid/
    raw_display.py", line 838, in draw_screen
        l = l.decode('utf-8')
    UnicodeDecodeError: 'utf-8' codec can't decode byte 0xfd in pos
    ition 6: invalid start byte
    
    
    type-question 
    opened by convict-git 0
Reference client for Bitmessage: a P2P encrypted decentralised communication protocol:

PyBitmessage Bitmessage is a P2P communication protocol used to send encrypted messages to another person or to many subscribers. It is decentralized

Bitmessage 2.7k Dec 30, 2022
A free & open modern, fast email client with user-friendly encryption and privacy features

Welcome to Mailpile! Introduction Mailpile (https://www.mailpile.is/) is a modern, fast web-mail client with user-friendly encryption and privacy feat

mailpile 8.7k Jan 4, 2023
The records of 42 million users from a third-party version of the popular Telegram messaging app have just been Iranian accounts leaked

TelegramDatabase About The records of 42 million users from a third-party version of the popular Telegram messaging app have just been Iranian account

Hamed Mohammadvand 10 Jan 14, 2022
First Party data integration solution built for marketing teams to enable audience and conversion onboarding into Google Marketing products (Google Ads, Campaign Manager, Google Analytics).

Megalista Sample integration code for onboarding offline/CRM data from BigQuery as custom audiences or offline conversions in Google Ads, Google Analy

Google 76 Dec 29, 2022
Instant messaging client in tkinter

Concord_client_tk Instant messaging client in tkinter Contributors : Ilade-s [https://github.com/Ilade-s] Doku [https://github.com/D0kuhebi] Descripti

Raphaël Merlet 2 Jun 15, 2022
Py-instant-search-redis - Source code example for how to build an instant search with redis in python

py-instant-search-redis Source code example for how to build an instant search (

Giap Le 4 Feb 17, 2022
Simplifying third-party authentication for web applications.

Velruse is a set of authentication routines that provide a unified way to have a website user authenticate to a variety of different identity provider

Ben Bangert 253 Nov 14, 2022
Third party Pytorch implement of Image Processing Transformer (Pre-Trained Image Processing Transformer arXiv:2012.00364v2)

ImageProcessingTransformer Third party Pytorch implement of Image Processing Transformer (Pre-Trained Image Processing Transformer arXiv:2012.00364v2)

null 61 Jan 1, 2023
Unofficial Valorant documentation and tools for third party developers

Valorant Third Party Toolkit This repository contains unofficial Valorant documentation and tools for third party developers. Our goal is to centraliz

Noah Kim 20 Dec 21, 2022
Let Xiao Ai speakers control third-party devices

A stupid way to extend miot/xiaoai. Demo for Panasonic Bath Bully FV-RB20VL1 逆向 Panasonic Smart China,获得控制浴霸的请求信息(HTTP 请求),详见 apps/panasonic.py; 2. 通过

bin 14 Jul 7, 2022
This is a simple bot that can be used to upload images to a third-party cloud (image hosting). Currently, only the imgbb.com website supports the bot. I Will do future updates

TGImageHosting This is a simple bot that can be used to upload images to a third party cloud (image hosting). Currently, only the imgbb.com website su

Abhijith N T 0 Dec 26, 2021
A simple way to store your passwords without requiring third party applications

SimplePasswordManager A simple way to store your passwords without requiring third party applications Simple To Use. Store Your Passwords For Each Web

Leone Odinga 1 Dec 23, 2021
Create or join a private chatroom without any third-party middlemen in less than 30 seconds, available through an AES encrypted password protected link.

PY-CHAT Create or join a private chatroom without any third-party middlemen in less than 30 seconds, available through an AES encrypted password prote

null 1 Nov 24, 2021
Visualizing weather changes across the world using third party APIs and Python.

WEATHER FORECASTING ACROSS THE WORLD Overview Python scripts were created to visualize the weather for over 500 cities across the world at varying di

G Johnson 0 Jun 12, 2021
List of all D&D 5e monsters: WotC + popular third-party sourcebooks

Xio's Guide to Monsters If you're a DM like me, and you have multiple sources of D&D 5e monsters that include WotC as well as third-party suppliers, y

null 20 Jan 6, 2023
Synci - Learning project to create a websocket based client server messaging application

Synci Learning project to create a websocket based client server messaging appli

null 2 Jan 13, 2022
Cryptocurrency application that displays instant cryptocurrency prices and reads prices with the Google Text-to-Speech library.

?? Cryptocurrency Price App ?? ◽ Cryptocurrency application that displays instant cryptocurrency prices and reads prices with the Google Text-to-Speec

Furkan Mert 2 Nov 8, 2021
universal messaging & notifications api

Pronounced "boat-shahft" What is botschaft? Botschaft is unified messaging & notifications appliance. Want to text yourself when a long-running task c

Tyler M. Kontra 25 Aug 16, 2022
Iris is a highly configurable and flexible service for paging and messaging.

Iris Iris core, API, UI and sender service. For third-party integration support, see iris-relay, a stateless proxy designed to sit at the edge of a pr

LinkedIn 715 Dec 28, 2022
Tracker to check the covid shot slot availability in India and send mobile alerts via Twilio Messaging Service.

Cowin-Slot-Tracker Tracker to check the covid vaccine slot availability in India and send mobile notifications through Twilio Messaging Service. Requi

invalid username 27 Nov 12, 2022