yowsup-cli(1) | command line tool that acts as WhatsApp client | yowsup-cli(1) |
yowsup-cli - command line tool that acts as WhatsApp client
yowsup-cli [COMMANDS] [OPTIONS] yowsup-cli registration [-h] [-v] [-d] [--help-config] [-c CONFIG] [-m MCC] [-n MNC] [-p PHONE] [-C CC] [-r (sms|voice) | -R code] yowsup-cli demos [-h] [-v] [-d] [--help-config] [-l phone:b64password | -c CONFIG] [-E {android,s40}], [-M] [-y] [-e] [-s phone message] [-S contacts] yowsup-cli version
yowsup-cli is a command line program, based in python-yowsup library, that allows one to login and use the WhatsApp service, providing all capabilities of an official WhatsApp client, as encryption of messages.
Available commands are registration, demos and version.
’registration' is used to register a mobile number to WhatsApp network.
’demos' is the proper command to regular use as a WhatsApp client.
’version' shows the yowsup-cli version.
Optional arguments
Configuration options
Modes to register
Specific lists for MCC and MNC
Specific lists for country codes
Optional arguments
Configuration options
Text interface demo
Echo client demo
Send client demo
Sync contacts
A configuration file, known as login credentials, can be used to gather some basic information that useful to register or login. This configuration file will be called by '-c' option.
WhatsApp protocol is basically a modified version of XMPP. It uses JID and password for login. The JID is the phone number registered with, which is a combination of the country code and the phone number. To login will be needed a password. These info can be saved in a text file, in the following format:
The line 'cc=' must be filled with the country code.
cc=55
phone=556101234567
password=NDkxNTIyNTI1NjAyMkBzLndoYXRzYXBwLm5ldA==
The 'phone=' field will be composed by 'country code' + 'area code' + 'phone number'. In the current example was used 55 (country = Brazil) + 61 (area code = Brasilia) + 01234567 (phone number). The country code must be provided without '+' or '00' leading.
Finally, the 'password=' field has the login password. This password will be gotten when you register the phone number using yowsup-cli. See the REGISTERING A NUMBER section. If you are registering a number, you can leave this field blank.
For security reasons, is recommended set a permission '600' to configuration file and make it hidden. More details about the configuration file can be viewed using this command:
$ yowsup-cli registration --help-config
WhatsApp registration involves 2 steps. First you need to request a registration code. After this, you resume the registration with code that you got. In both cases, you can or not use a configuration file (see the above section in this manual page).
An example not using a configuration file:
Now, using a configuration file:
yowsup-cli registration --requestcode sms --phone 556101234567 --cc 55 --mcc 123 --mnc 456
yowsup-cli registration --register 123-456 --phone 556101234567 --cc 55
The first command (the '--requestcode' action) will show something similar to:
yowsup-cli registration --requestcode sms --mcc 123 --mnc 456 -c /home/user/.yowsuprc
yowsup-cli registration --register 123-456 -c /home/user/.yowsuprc
After this, the code will then be delivered to your mobile phone number via your preferred method (SMS/voice). Once you have obtained the code, you proceed with the second step, which is to send that code using the '--register' argument. This example will consider the received code as being 123-456:
status: sent
retry_after: 10805
length: 6
method: sms
After the last command, you will see something similar to:
yowsup-cli registration --register 123-456 -c /home/user/.yowsuprc
If you successfully register, WhatsApp will generate a password for your which will be displayed in the command output (see the 'pw:' line). If you want to use a config file, you MUST MANUALLY store this password in this config file. See an example:
status: ok
kind: free
pw: 1coGO6bwjT8Uukw9qa8v3ql2KXM=
price: US$0.99
price_expiration: 1407002374
currency: USD
cost: 0.99
expiration: 1435773701
login: 556101234567
type: new
cc=55
phone=556101234567
password=1coGO6bwjT8Uukw9qa8v3ql2KXM=
Start a chat with 5511190102030, after connected in interactive mode (see the last command):
Send a picture to 5511190102030, after connected in interactive mode:
/L
/message send 5511190102030 "Testing WhatsApp..."
To see all commands available in interactive mode:
/L
/image send 5511190102030 /home/user/picture.jpg
/help
yowsup-cli was developed by Tarek Galal <tare2.galal@gmail.com>.
This manual page was written by Joao Eriberto Mota Filho <eriberto@debian.org> for the Debian project (but may be used by others).
Apr 2016 | YOWSUP-CLI 2.0.15 (from yowsup 2.4.102) |