.TH yowsup-cli "1" "Apr 2016" "YOWSUP-CLI 2.0.15 (from yowsup 2.4.102)" "command line tool that acts as WhatsApp client" .\" Text automatically generated by txt2man .SH NAME \fByowsup-cli \fP- command line tool that acts as WhatsApp client \fB .SH SYNOPSIS .nf .fam C \fByowsup-cli\fP [\fICOMMANDS\fP] [\fIOPTIONS\fP] \fByowsup-cli\fP \fIregistration\fP [\fB-h\fP] [\fB-v\fP] [\fB-d\fP] [\fB--help-config\fP] [\fB-c\fP \fICONFIG\fP] [\fB-m\fP \fIMCC\fP] [\fB-n\fP \fIMNC\fP] [\fB-p\fP \fIPHONE\fP] [\fB-C\fP \fICC\fP] [\fB-r\fP (sms|voice) | \fB-R\fP \fIcode\fP] \fByowsup-cli\fP \fIdemos\fP [\fB-h\fP] [\fB-v\fP] [\fB-d\fP] [\fB--help-config\fP] [\fB-l\fP \fIphone:b64password\fP | \fB-c\fP \fICONFIG\fP] [\fB-E\fP {android,s40}], [\fB-M\fP] [\fB-y\fP] [\fB-e\fP] [\fB-s\fP \fIphone\fP \fImessage\fP] [\fB-S\fP \fIcontacts\fP] \fByowsup-cli\fP \fIversion\fP .fam T .fi .fam T .fi .SH DESCRIPTION \fByowsup-cli\fP 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. .SH COMMANDS Available commands are \fIregistration\fP, \fIdemos\fP and \fIversion\fP. .PP \(cq\fIregistration\fP' is used to register a mobile number to WhatsApp network. .PP \(cq\fIdemos\fP' is the proper command to regular use as a WhatsApp client. .PP \(cq\fIversion\fP' shows the \fByowsup-cli\fP \fIversion\fP. .SH REGISTRATION OPTIONS Optional arguments .RS .TP .B \fB-h\fP, \fB--help\fP Show this help \fImessage\fP and exit. .TP .B \fB-v\fP, --\fIversion\fP Print \fIversion\fP info and exit. .TP .B \fB-d\fP, \fB--debug\fP Show debug messages. .TP .B \fB--help-config\fP Print a config file sample. .RE .PP Configuration options .RS .TP .B \fB-c\fP \fICONFIG\fP, \fB--config\fP \fICONFIG\fP Path to config file. If this is not set then you must set at least --\fIphone\fP and \fB--cc\fP arguments. The config file is optional. Other configuration arguments have higher priority if given, and will override those specified in the config file. .TP .B \fB-m\fP \fIMCC\fP, \fB--mcc\fP \fIMCC\fP \fIMCC\fP (Mobile Country Code). Check your \fIMCC\fP at a specific list (see below). .TP .B \fB-n\fP \fIMNC\fP, \fB--mnc\fP \fIMNC\fP \fIMNC\fP (Mobile Network Code). Check your \fIMNC\fP at a specific list (see below). .TP .B \fB-p\fP \fIPHONE\fP, --\fIphone\fP \fIPHONE\fP The full \fIphone\fP number including the country \fIcode\fP defined in 'cc', without preceding '+' or '00'. .TP .B \fB-C\fP \fICC\fP, \fB--cc\fP \fICC\fP \fICC\fP (Country Code). .RE .PP Modes to register .RS .TP .B \fB-r\fP (sms|voice), \fB--requestcode\fP (sms|voice) Request the digit \fIregistration\fP \fIcode\fP from WhatsApp. .TP .B \fB-R\fP \fIcode\fP, \fB--register\fP \fIcode\fP Register account on WhatsApp using a \fIcode\fP previously received. .RE .PP Specific lists for \fIMCC\fP and \fIMNC\fP .RS .IP \(bu 3 http://mcclist.com .IP \(bu 3 http://www.mcc-mnc.com .IP \(bu 3 http://en.wikipedia.org/wiki/Mobile_country_code .RE .PP Specific lists for country codes .RS .IP \(bu 3 https://countrycode.org .IP \(bu 3 http://mcclist.com/country-calling-codes.asp .IP \(bu 3 http://www.ipipi.com/help/telephone-country-codes.htm .SH DEMOS OPTIONS Optional arguments .RS .TP .B \fB-h\fP, \fB--help\fP Show this help \fImessage\fP and exit. .TP .B \fB-v\fP, --\fIversion\fP Print \fIversion\fP info and exit. .TP .B \fB-d\fP, \fB--debug\fP Show debug messages. .TP .B \fB--help-config\fP Print a config file sample. .RE .PP Configuration options .RS .TP .B \fB-l\fP \fIphone:b64password\fP, \fB--login\fP \fIphone:b64password\fP WhatsApp login credentials, in the format phonenumber:password, where password is base64 encoded. .TP .B \fB-c\fP \fICONFIG\fP, \fB--config\fP \fICONFIG\fP Path to config file containing authentication info. For more info about the config format, use \fB--help-config\fP. .TP .B \fB-E\fP {android,s40}, \fB--env\fP {android,s40} Set the environment that yowsup must simulate. Default: android. .TP .B \fB-M\fP, \fB--unmoxie\fP Disable support for WhatsApp E2E encryption. .RE .PP Text interface demo .RS .TP .B \fB-y\fP, \fB--yowsup\fP Start the Yowsup text interface client (interactive mode). Note that in this mode two clients or a group can talk in chat mode, send images, etc. .RE .PP Echo client demo .RS .TP .B \fB-e\fP, \fB--echo\fP Start the Yowsup Echo client. .RE .PP Send client demo .RS .TP .B \fB-s\fP \fIphone\fP \fImessage\fP, \fB--send\fP \fIphone\fP \fImessage\fP Send a \fImessage\fP to specified \fIphone\fP number, wait for server receipt and exit. .RE .PP Sync \fIcontacts\fP .RS .TP .B \fB-S\fP \fIcontacts\fP, \fB--sync\fP \fIcontacts\fP Sync (check valid) WhatsApp \fIcontacts\fP. .SH CONFIGURATION FILE 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 '\fB-c\fP' option. .PP WhatsApp protocol is basically a modified \fIversion\fP of XMPP. It uses JID and password for login. The JID is the \fIphone\fP number registered with, which is a combination of the country \fIcode\fP and the \fIphone\fP number. To login will be needed a password. These info can be saved in a text file, in the following format: .PP .nf .fam C cc=55 phone=556101234567 password=NDkxNTIyNTI1NjAyMkBzLndoYXRzYXBwLm5ldA== .fam T .fi The line 'cc=' must be filled with the country \fIcode\fP. .PP The '\fIphone\fP=' field will be composed by 'country \fIcode\fP' + 'area \fIcode\fP' + '\fIphone\fP number'. In the current example was used 55 (country = Brazil) + 61 (area \fIcode\fP = Brasilia) + 01234567 (\fIphone\fP number). The country \fIcode\fP must be provided without '+' or '00' leading. .PP Finally, the 'password=' field has the login password. This password will be gotten when you register the \fIphone\fP number using \fByowsup-cli\fP. See the REGISTERING A NUMBER section. If you are registering a number, you can leave this field blank. .PP 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: .PP .nf .fam C $ yowsup-cli registration \-\-help-config .fam T .fi .SH REGISTERING A NUMBER WhatsApp \fIregistration\fP involves 2 steps. First you need to request a \fIregistration\fP \fIcode\fP. After this, you resume the \fIregistration\fP with \fIcode\fP that you got. In both cases, you can or not use a configuration file (see the above section in this manual page). .PP An example not using a configuration file: .PP .nf .fam C yowsup-cli registration \-\-requestcode sms \-\-phone 556101234567 \-\-cc 55 \-\-mcc 123 \-\-mnc 456 yowsup-cli registration \-\-register 123-456 \-\-phone 556101234567 \-\-cc 55 .fam T .fi Now, using a configuration file: .PP .nf .fam C yowsup-cli registration \-\-requestcode sms \-\-mcc 123 \-\-mnc 456 \-c /home/user/.yowsuprc yowsup-cli registration \-\-register 123-456 \-c /home/user/.yowsuprc .fam T .fi The first command (the '\fB--requestcode\fP' action) will show something similar to: .PP .nf .fam C status: sent retry_after: 10805 length: 6 method: sms .fam T .fi After this, the \fIcode\fP will then be delivered to your mobile \fIphone\fP number via your preferred method (SMS/voice). Once you have obtained the \fIcode\fP, you proceed with the second step, which is to send that \fIcode\fP using the '\fB--register\fP' argument. This example will consider the received \fIcode\fP as being 123-456: .PP .nf .fam C yowsup-cli registration \-\-register 123-456 \-c /home/user/.yowsuprc .fam T .fi After the last command, you will see something similar to: .PP .nf .fam C status: ok kind: free pw: 1coGO6bwjT8Uukw9qa8v3ql2KXM= price: US$0.99 price_expiration: 1407002374 currency: USD cost: 0.99 expiration: 1435773701 login: 556101234567 type: new .fam T .fi 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: .PP .nf .fam C cc=55 phone=556101234567 password=1coGO6bwjT8Uukw9qa8v3ql2KXM= .fam T .fi .SH SENDING MESSAGES .TP .B Send a simple \fImessage\fP to +0055 11 190102030 (using a config file): $ \fByowsup-cli\fP \fIdemos\fP \fB-c\fP /path/.config_file \fB-s\fP 5511190102030 "Testing WhatsApp\.\.\." .TP .B Send a simple \fImessage\fP to +0055 11 190102030 (without a config file), from 556101234567: $ \fByowsup-cli\fP \fIdemos\fP \fB-l\fP 556101234567:1coGO6bwjT8Uukw9qa8v3ql2KXM= \fB-s\fP 5511190102030 "Testing WhatsApp\.\.\." .TP .B Start the interactive mode (using a config file) $ \fByowsup-cli\fP \fIdemos\fP \fB-c\fP /path/.config_file \fB-y\fP .PP Start a chat with 5511190102030, after connected in interactive mode (see the last command): .PP .nf .fam C /L /message send 5511190102030 "Testing WhatsApp\.\.\." .fam T .fi Send a picture to 5511190102030, after connected in interactive mode: .PP .nf .fam C /L /image send 5511190102030 /home/user/picture.jpg .fam T .fi To see all commands available in interactive mode: .PP .nf .fam C /help .fam T .fi .SH AUTHOR \fByowsup-cli\fP was developed by Tarek Galal . .PP This manual page was written by Joao Eriberto Mota Filho for the Debian project (but may be used by others).