# yowsup-cli: Send Whatsapp messages from command-line

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
# 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
# cat yowsup-cli.config

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)




Anonymous said...

Get the newest Whatsapp Hack V2 and spy on your love one!

Trochey said...
This comment has been removed by the author.
Anonymous said...

In Argentina use 549XXxxxxxxxx

Lucho Q.A.C said...

After this line of code ./yowsup-cli --requestcode sms --config yowsup-cli.config

I get this error:

Detected cc: 54
status: fail
reason: missing

Anonymous said...


give full path of your config file at end....i.e. if in same directory, - config ./yowsup-cli.config

Anonymous said...

i have completed steps till requesting sms and i got this output.
Detected cc: 91
status: sent
retry_after: 1805
length: 6
method: sms
but after this i have not yet received any sms to my mobile number...so what to do????

Anonymous said...

DMCA takedownon YouSup :(

Kenneth Kinyanjui said...

Did as shown here but I get an Auth Fail when sending

pavan said...

Thanks you very much , Its really working.

Saeed Gharedaghi said...

i can't create group with yowsup
how to create group???
please help me

DK said...

how to sync whatsapp contact

Sara said...

Wow i never thought that this is a possibility, i would try to do that but i am not really good with the code, so i think i need to get a whats app download to send messages.

David Okwii said...

Wow, this worked for me. Thanks

Michael Shiloh said...

I too am getting

Detected cc: 1
status: fail
reason: missing

I followed the advice from Anonymous to give the full path to my config file, but still get that error.

Any suggestions?

Michael Shiloh said...

Partial answer to my own question, using information from https://vpsboard.com/topic/3954-how-to-use-whatsapp-from-your-linux-box/:

First, need to request a code for new phone number:

./yowsup-cli --requestcode sms --config ./yowsup-cli.config

which will cause an SMS message containing a 6 digit code to be sent to the number in the config file.

Then register with the new code:

./yowsup-cli --register xxx-xxx --config ./yowsup-cli.config

BTW as i understand it, WhatsApp only allows one device to be registered for each phone number, so if you use WhatsApp on your cellphone you can't use your cellphone number on your computer as well. I used my cellphone the first time and while it worked, it prevented WhatsApp from working on my cellphone. So I re-registered my cellphone, and now I'm trying to use a Google Voice number.

I have not been able to verify this yet as it failed the first time I requested a code for my Google Voice number, saying

status: fail
retry_after: 3600
reason: no_routes

I'm not sure what units the 3600 is but I've waited half an hour and was told that was too soon, so I'll try again in a couple of hours. I hope this doesn't mean that a Google Voice number can not be used with WhatsApp.

Romeo Agustus said...

It works great on my laptop at home. But it wont work at my office because we use proxy.
i have used enviroment variable http_proxy and https_proxy, but still doesnt work.

I've googled around and i found other solutio that replace whatsapp host at httplib.connection(host, port) into httplib.connection(proxy,port) but then i got protocol issue...

right now, Im still trying to solve this. But if you already have solution, i will be greatly than you.

Anonymous said...


I have installed Python 2.7 but I am new to python.

Only download link I found for yowsup is github.com/jperelli/yowsup

How Do I install yowsup in windows? I just extracted the files in C:\python27\Lib\yowsup

But I don't see yowsup-cli.py anywhere in C:\python27

when I run in IDE:
>>> yowsup-cli --requestcode sms --config yowsup.config;

I get: SyntaxError: invalid syntax
What is wrong?

I will appreciate some help..

Thanks in advance.

Anonymous said...

I used PIP to install yowsup.
But there is no yowsup-cli.

How can I run:
yowsup-cli --requestcode sms --config yowsup-cli.config


Anonymous said...

status: fail
reason: blocked

What should i do if i get this error. It was working for few days but suddenly its giving error saying blocked. Is there is any method to unblock.

PUNEETH A H said...

/yowsup-master/src$ ./yowsup-cli --send 919591xxxxxxx "Test message" --wait --config yowsup-cli.config
Detected cc: 91
Auth Failed!


hi..I am getting the below error when I am typing the command ‘chmod +x yowsup-cli’

chmod: changing permissions of ‘yowsup-cli’: Operation not permitted

what to do?

Anonymous said...

Is it possible to send images using this? If yes, how?

Anonymous said...

try "sudo chmod +x yowsup-cli"

John ndung'u said...

works really well on my ubuntu 12.04 lts
this link might also aswell

John alero said...

Dear All,

We are facing below error when we execute the command in centos terminal.

[root@whatsu src]# ./yowsup-cli --requestcode sms --config yowsup-cli.config
File "./yowsup-cli", line 98
unistr = str if sys.version_info >= (3, 0) else unicode
SyntaxError: invalid syntax

Please reply

Top 10 Antivirus said...

Now Days everyone looking for the Best Antivirus for MAC. It's very difficult to choosing the Best Antivirus Program..

Diego Siwer said...

Excelent articule! why is it that I always have to use "demos, version or registration" as first argument, before sending a message? Also: I'm being able to send a message using "./yowsup-cli demos -c whatsapp_config.txt -s 54911.... 'MESSAGE' ", but I do not find the way to LISTEN to new received messages. Hope someone's help. Thanks in advance, Diego

ADMIN said...

good one bro
happy diwali images
happy diwali images 2015
happy diwali

pavan kumar said...

i got sms code to my moblie and register also but i am getting error that in sending sms to number how to send a sms tell me the synatx of it plz help me out

Blogger said...

eToro is the #1 forex trading platform for beginner and pro traders.