yowsup-cli(1)

πŸ“¦ version 3.2.3, in ubuntu jammy

πŸ’– yowsup-cli β€” the manual, but make it make sense πŸ’–

okay bestie, pull up a chair, grab a boba, because we're learning about yowsup-cli β€” a command line tool that acts as WhatsApp client, and yes, that is genuinely iconic of it. 🫢


✨ NAME ✨

yowsup-cli β€” command line tool that acts as WhatsApp client


🌈 SYNOPSIS 🌈

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

no cap, those four lines are the whole vibe of how you invoke it. πŸ“œβœ¨


πŸ¦‹ DESCRIPTION πŸ¦‹

yowsup-cli is a command line program, based in the 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.

like… it's giving actual real WhatsApp client energy, except it lives in your terminal and you drive it with your keyboard. main character behavior fr fr. πŸ’…


πŸ‘‘ COMMANDS πŸ‘‘

Available commands are registration, demos and version. three of them. that's the whole squad.

  • 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.

πŸ’… REGISTRATION OPTIONS πŸ’…

Optional arguments

  • -h, --help β€” Show this help message and exit.
  • -v, --version β€” Print version info and exit.
  • -d, --debug β€” Show debug messages.
  • --help-config β€” Print a config file sample.

Configuration options

  • -c CONFIG, --config CONFIG β€” Path to config file. If this is not set then you must set at least --phone and --cc arguments. The config file is optional. Other configuration arguments have higher priority if given, and will override those specified in the config file.
  • -m MCC, --mcc MCC β€” MCC (Mobile Country Code). Check your MCC at a specific list (see below).
  • -n MNC, --mnc MNC β€” MNC (Mobile Network Code). Check your MNC at a specific list (see below).
  • -p PHONE, --phone PHONE β€” The full phone number including the country code defined in 'cc', without preceding '+' or '00'.
  • -C CC, --cc CC β€” CC (Country Code).

Modes to register

  • -r (sms|voice), --requestcode (sms|voice) β€” Request the digit registration code from WhatsApp.
  • -R code, --register code β€” Register account on WhatsApp using a code previously received.

Specific lists for MCC and MNC

Specific lists for country codes


πŸŽ€ DEMOS OPTIONS πŸŽ€

Optional arguments

  • -h, --help β€” Show this help message and exit.
  • -v, --version β€” Print version info and exit.
  • -d, --debug β€” Show debug messages.
  • --help-config β€” Print a config file sample.

Configuration options

  • -l phone:b64password, --login phone:b64password β€” WhatsApp login credentials, in the format phonenumber:password, where password is base64 encoded.
  • -c CONFIG, --config CONFIG β€” Path to config file containing authentication info. For more info about the config format, use --help-config.
  • -E {android,s40}, --env {android,s40} β€” Set the environment that yowsup must simulate. Default: android.
  • -M, --unmoxie β€” Disable support for WhatsApp E2E encryption.

Text interface demo

  • -y, --yowsup β€” 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.

Echo client demo

  • -e, --echo β€” Start the Yowsup Echo client.

Send client demo

  • -s phone message, --send phone message β€” Send a message to specified phone number, wait for server receipt and exit.

Sync contacts

  • -S contacts, --sync contacts β€” Sync (check valid) WhatsApp contacts.

πŸ“ 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 -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:

cc=55
phone=556101234567
password=NDkxNTIyNTI1NjAyMkBzLndoYXRzYXBwLm5ldA==

The line cc= must be filled with the country code.

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.

security check bestie!! 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

🌸 REGISTERING A NUMBER 🌸

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:

yowsup-cli registration --requestcode sms --phone 556101234567 --cc 55 --mcc 123 --mnc 456
yowsup-cli registration --register 123-456 --phone 556101234567 --cc 55

Now, using a configuration file:

yowsup-cli registration --requestcode sms --mcc 123 --mnc 456 -c /home/user/.yowsuprc
yowsup-cli registration --register 123-456 -c /home/user/.yowsuprc

The first command (the --requestcode action) will show something similar to:

status: sent
retry_after: 10805
length: 6
method: sms

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:

yowsup-cli registration --register 123-456 -c /home/user/.yowsuprc

After the last command, you will see something similar to:

status: ok
kind: free
pw: 1coGO6bwjT8Uukw9qa8v3ql2KXM=
price: US$0.99
price_expiration: 1407002374
currency: USD
cost: 0.99
expiration: 1435773701
login: 556101234567
type: new

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:

cc=55
phone=556101234567
password=1coGO6bwjT8Uukw9qa8v3ql2KXM=
not me having to copy the password by hand 😭 yes bestie, MANUALLY. the tool will not do it for you. that's the whole point of the warning.

πŸ’Œ SENDING MESSAGES πŸ’Œ

Send a simple message to +0055 11 190102030 (using a config file):

$ yowsup-cli demos -c /path/.config_file -s 5511190102030
"Testing WhatsApp..."

Send a simple message to +0055 11 190102030 (without a config file), from 556101234567:

$ yowsup-cli demos -l 556101234567:1coGO6bwjT8Uukw9qa8v3ql2KXM=
-s 5511190102030 "Testing WhatsApp..."

Start the interactive mode (using a config file)

$ yowsup-cli demos -c /path/.config_file -y

Start a chat with 5511190102030, after connected in interactive mode (see the last command):

/L
/message send 5511190102030 "Testing WhatsApp..."

Send a picture to 5511190102030, after connected in interactive mode:

/L
/image send 5511190102030 /home/user/picture.jpg

To see all commands available in interactive mode:

/help

πŸ’œ AUTHOR πŸ’œ

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).


okay so that's the whole thing, you ate that, you're a yowsup girlie now πŸ’…βœ¨ this was YOWSUP-CLI 2.0.15 (from yowsup 2...), dated Apr 2016 β€” shoutout to the era that birthed it 🫢 bye bestie, go register a number responsibly πŸŒˆπŸŽ€

πŸ“¦ where this page comes from