This yowsup2 installation requirement is valid. But I found I had to
apt-get install python2.7-dev too, before I can
pip install Pillow. Next you can register your number using yowsup-cli. Now test send messages using this command
yowsup-cli demos -c -y. Type
/help for all command and
/L to quick login. Type
/message send <number-to> <your-message-here>.
WhatsAPI is more easy to install but I wanna share simple .php test. First git clone the source from github to your /var/www/, and after downloaded, place this php file on /var/www/WhatsApi-Official/.
$username = "your-phone-number ex.62811987654";
$identity = "your-phone-number";
$nickname = "your-phone-number";
$password = "your-password"; // The one we got registering the number
$debug = true;
// Create a instance of WhastPort.
$w = new WhatsProt($username, $identity, $nickname, $debug);
connect(); // Connect to WhatsApp network
$w->loginWithPassword($password); // logging in with the password we got!
$target = ‘to-phone-number’; // The number of the person you are sending the message ex.6285798766543
$message = ‘Hi! 🙂 this is a test message’;
$w->sendMessage($target , $message);
$events = new MyEvents($w);