WhatsApp with BitlBee

Since many people seem to be intersted in using whatsapp with bitlbee, here's a rough briefly tested summary of how to get it working. Please send reports of success or any issues to #bitlbee.

Requirements

Caveats

Registration

You need to get a password to connect. This password is not the IMEI as you might have read (it was, a few years ago), but you need to extract it somehow from a running whatsapp client, or create a new one. At the time of this writing it doesn't seem possible to sniff it, so, alternatives:

If you succeed at this step, congratulations. Try not to get too desperate if it goes wrong, you might end up with a huge cooldown period. Check the issue trackers of the relevant tool to see if other people have the same issue, as the registration tokens might have changed.

An example of creating an account

Putting it all together

The next step is to get whatsapp-purple working in bitlbee.

Notes

adding Contacts in irssi/bitlbee using trigger.pl (prior v3.4)

(There is no need for a workaround as of bitlbee version 3.4, which does keep a contact list.) This is a very quick and dirty (not to say security flawed) workaround for adding contacts via trigger.pl and a separate contacts file (work still in progress, cleanup/rewrite more than welcome!). Trigger will be the successful whatsapp log-in as displayed in the control channel output by 'root':

One could just as well create a trigger for each individual contact and avoid using "-command exec …" like:

/trigger -public -tags 'bitlbee' -channels '&bitlbee' -masks 'root' -pattern 'whatsapp - Logging in: Logged in' -command 'add whatsapp 1234567890 fancypants'
/trigger -public -tags 'bitlbee' -channels '&bitlbee' -masks 'root' -pattern 'whatsapp - Logging in: Logged in' -command 'add whatsapp 0123456789 buddy'
/trigger -public -tags 'bitlbee' -channels '&bitlbee' -masks 'root' -pattern 'whatsapp - Logging in: Logged in' -command 'add whatsapp 9012345678 mother'
/trigger save