A whatsapp api to send message. Using Whatsapp web, JavaScript and PHP.
Install Violentmonkey on your web browser (or any javascript injector). Go on web.whatsapp.com and login to your accounct.
- Create
config.json
inincludes
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
.
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.
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]"
}