Installation and configuration
apt-get install python python-dateutil python-argparse
wget https://github.com/tgalal/yowsup/archive/master.zip
unzip master.zip
cd yowsup-master/src
cp config.example yowsup-cli.config
-
cat yowsup-cli.config
cc=34 phone=34123456789 id= password=
chmod +x yowsup-cli
-
./yowsup-cli --requestcode sms --config yowsup-cli.config
status: sent retry_after: 3605 length: 6 method: sms
-
./yowsup-cli --register 123-456 --config yowsup-cli.config
status: ok kind: free pw: S1nBGCvZhb6TBQrbm2sQCfSLkXM= price: 0,89 price_expiration: 1362803446 currency: EUR cost: 0.89 expiration: 1391344106 login: 34123456789 type: new
-
Copy the
pw
field from the output & paste it in front ofpassword
field in theyowsup-cli.config
. Youryowsup-cli.config
should look like below:cat yowsup-cli.config
cc=34 phone=34123456789 id= password=S1nBGCvZhb6TBQrbm2sQCfSLkXM=
Send a message
./yowsup-cli --send 34111222333 "Test message" --wait --config yowsup-cli.config
Connecting to c.whatsapp.net
Authed 34123456789
Sent message
Got sent receipt
Receive messages
./yowsup-cli --listen --autoack --keepalive --config yowsup-cli.config
Connecting to c.whatsapp.net
Authed 34123456789
34111222333@s.whatsapp.net [02-02-2013 14:14]:I have received a test message from you
Interactive: Send and receive messages
./yowsup-cli --interactive 34111222333 --wait --autoack --keepalive --config yowsup-cli.config
Connecting to c.whatsapp.net
Authed 34123456789
Starting Interactive chat with 34111222333
Enter Message or command: (/available, /lastseen, /unavailable)
Yes, I know it
34123456789 [02-02-2013 14:15]:Yes, I know it
Enter Message or command: (/available, /lastseen, /unavailable)
34111222333@s.whatsapp.net [02-02-2013 14:16]:What are you doing?
Enter Message or command: (/available, /lastseen, /unavailable)
Testing a new application
34123456789 [02-02-2013 14:16]:Testing a new application
Enter Message or command: (/available, /lastseen, /unavailable)
/unavailable
Too much of geeky stuff ??
- Skip all the steps of sending and receiving a message. Just install the WhatsApp client & configure it as mentioned.
- We will use Pidgin Instant Messenger to make this work. Install it if you don’t have it.
sudo apt-get install pidgin
- Then install WhatsApp protocol implementation for Pidgin.
sudo add-apt-repository ppa:whatsapp-purple/ppa
sudo apt-get update
sudo apt-get install pidgin-whatsapp
- Now simply launch Pidgin. Add a whatsapp account, put username as the phone number with country code (as written above) and password as the string we obtained earlier.
- Use WhatsApp on Ubuntu of yours. ( NOTE : Don’t use it simultaneously on your mobile ).
WhatsApp Emojis for Pidgin
You need to install and enable the Emoji smiley theme. Just copy one of the sub-directories from following Git repositories to $HOME/.purple/smileys/
and enable the newly installed theme in the Pidgin preferences window.
Known Issues
I’ve tested this on my Ubuntu 13.04 (64 bit) & it seems to be working perfectly. Though the trouble part is at the other hand. Whenever the other person receives a message sent by us via Pidgin; the mobile phone hangs up a bit & WhatsApp gets crashed
Yet, it’s all togather a different story whether WhatsApp mobile app is reading messages properly which comes from Pidgin or not. Maybe Pidgin seems to be sending any unknown message/socket headers which the mobile app can’t decode. (Tested on Samsung S Advance & Micromax Canvas) Anyway, this problem is for the mobile users and not for you if you want to use WhatsApp on your machine.
Regarding Emojis, some of them might not work but this is the best that I’ve come across.
NOTE : This method will not work if you’re already using WhatsApp on your mobile with same mobile number. You will need another number to get this working.