[HN Gopher] Libwa: WhatsApp C Library
       ___________________________________________________________________
        
       Libwa: WhatsApp C Library
        
       Author : keepamovin
       Score  : 61 points
       Date   : 2024-01-03 17:05 UTC (5 hours ago)
        
 (HTM) web link (github.com)
 (TXT) w3m dump (github.com)
        
       | yoouareperfect wrote:
       | What's a good use case for this library? Something that needs to
       | send messages from an embedded system?
        
         | londons_explore wrote:
         | If you want to send whatsapp messages from a RPi, you basically
         | can't do it today (since the only working implementations today
         | require a headless Chromium instance, and good luck fitting
         | that into 512M of RAM).
        
           | jorvi wrote:
           | With zram that's more like 1.5gb, so doesn't seem too
           | impossible.
        
           | circuit10 wrote:
           | What about https://github.com/tulir/whatsmeow?
        
       | ricardo81 wrote:
       | Devil's advocate (and as a very lightweight Whatsapp user), is
       | this just based on a scrape/listen of how whatsapp currently
       | works, so maybe prone to breaking?
       | 
       | Pessimistically any bit of code can scrape a present day service,
       | is this easily maintanable, how often will it break, maybe
       | permanently?
       | 
       | That said, fair play for sharing in the open, just querying the
       | long term efficacy of using it.
       | 
       | Unless using an official API, things can be a bit brittle.
        
         | jeroenhd wrote:
         | I've been using a Matrix bridge for WhatsApp for a couple of
         | years, and rarely bother updating the container. I don't think
         | I've ever run into an API deprecation issue.
         | 
         | Perhaps there are implementation differences between this and
         | the Go library underlying the Matrix bridge, but I don't think
         | API incompatibilities should be a concern.
        
       | Kwpolska wrote:
       | Last commit in 2019, I wouldn't expect it to work. And why would
       | this specific library be interesting?
        
       | londons_explore wrote:
       | Whatsapp did a revamp of their web client a few years ago.
       | 
       | The previous version pretty much connected to your phone and
       | proxied all send/receive message requests via your phone. The
       | phone stored all the crypto keys etc for e2e.
       | 
       | The new version acts as a fully fledged client. All "1:1" chats
       | are in fact group chats, containing multiple 'users' for all of
       | your devices, and multiple users for all of the other persons
       | devices. Cryptography is still e2e secure, but now there are n+m
       | endpoints for all of your+their devices.
       | 
       | Therefore, I would expect major updates to be needed to this
       | client to make it continue to work.
        
       | sylware wrote:
       | The intention is good, but they will try to break it as much as
       | they can.
       | 
       | The only way to robustely deal with those "people" is to go thru
       | extremely aggressive technical regulation: enforce a small and
       | simple, but good enough, very stable in time network protocol
       | support for the client.
        
       | mfashby wrote:
       | A more recently updated, and definitely working library :
       | https://github.com/tulir/whatsmeow
        
         | madduci wrote:
         | Sidenote: it is not developed in C, but with Go
        
       | qeternity wrote:
       | This hasn't been updated since 2019 which is long before WhatsApp
       | made substantial changes around multi device usage. This is
       | almost certain to be broken.
        
       | tacker2000 wrote:
       | Does anyone know if its possible to collect all images that were
       | posted in a whatsapp group, given one group members
       | login/credentials?
        
         | godelski wrote:
         | I believe you can do this without much of a hassle if your
         | phone is rooted. But to root your phone you need to unlock the
         | bootloader which will clear all the data. You could also
         | probably write a script and grab using the web client? I'm not
         | sure if you have full history and just trying to be helpful.
         | Use better advice if it comes by.
        
         | Rygian wrote:
         | You can Syncthing / FolderSync all images from any Android
         | phone. However, I am still looking for a way to access my own
         | chat data to link which image belongs to which group.
        
         | emmelaich wrote:
         | Google Photos will back it up if you so choose.
        
       | rodarima wrote:
       | Author here. I haven't used in years so is probably pretty
       | broken. There is a "wire" branch that implemented some debugging
       | of the different encapsulation layers in a plain text format.
       | 
       | Also, last time I was using it I needed to use a throwaway number
       | as WhatsApp was detecting and banning anything that resembled a
       | non-official client.
       | 
       | This may (finally) change with the Digital Markets Act [1][2] in
       | Europe, but sounds too good to be true.
       | 
       | [1]: https://digital-markets-act.ec.europa.eu/index_en
       | 
       | [2]: https://techcrunch.com/2023/09/11/whatsapp-has-started-
       | work-...
        
       ___________________________________________________________________
       (page generated 2024-01-03 23:00 UTC)