/Whatsapp-message-API-JS-PHP

A whatsapp api to send message

Primary LanguagePHPGNU General Public License v3.0GPL-3.0

Whatsapp-message-API-JS-PHP

A whatsapp api to send message. Using Whatsapp web, JavaScript and PHP.

Requirement

Install Violentmonkey on your web browser (or any javascript injector). Go on web.whatsapp.com and login to your accounct.

Setup API

  • Create config.json in includes directory who contain :
{
    "host" : "XXXXXXX",
    "dbusername" : "XXXXXXX",
    "dbpassword" : "XXXXXXX"
}
  • Change in functs_db.php by your identifiants (local) :
$config = [
    "host" => "localhost",
    "dbusername" => "root",
    "dbpassword" => ""
];
  • Change in index.php by your database name :
$database = connectDB("nothingefdglobal", $config);
  • Change in script.js the location of your API :
let url = "http://localhost/Whatsapp-message-API-JS-PHP/";
  • Install the database nothingefdglobal.sql.

Setup Web

Go on web.whatsapp.com and login to your accounct. Import Violentmonkey_Whatsapp.zip to your Violentmonkey. Verify is the script is correctly enable. Reload the web page.

How to use API

You can use POST or GET request to API.

  • GET
http://localhost/Whatsapp-message-API-JS-PHP/?api=app_whtsp_update_content&
pass=[PASSWORD]&
message=[MESSAGE]&
reciver=[PHONE OF RECIVER]
  • POST
{
    "api":"app_whtsp_update_content",
    "pass":"[PASSWORD]",
    "message":"[MESSAGE]",
    "receiver":"[PHONE OF RECEIVER]"
}