Double your sales

More effective than SMS. Get more feedback and sales from your customers

Fastest Whatsapp API

Whatsapp-api allows you to easily and quickly generate sales, chat and other bots on whatsapp for businesses and other users.

Continuous Service

A great solution to serve your customers 24/7 via Whatsapp.

Easy to use

Whatsapp-api is very easy to use and our support line is here for you.

Economic

Manage your Whatsapp number for just $ 0.66 a day.

How to use?

Easy api is very easy and fast to use.

  • PHP
  • Nodejs

Send Message with PHP

$data = [
    'phone' => '+441777889944', // Receiver
    'body' => 'Hello, this is a test message!', // Message
];

$url = 'https://api.wha-api.com/message?token=MIuv70gkAN';
$options = stream_context_create(['http' => [
    'method'  => 'POST',
    'header'  => 'Content-type: application/json',
    'content' => json_encode($data) // Encoding JSON
    ]
]);
// Start http request
$response = file_get_contents($url, false, $options);

Get All Messages with PHP

// URL for request GET /messages
$url = 'https://api.wha-api.com/messages?token=MIuv70gkAN';
$result = file_get_contents($url); // Send a request
$data = json_decode($result, 1); // Parse JSON
foreach($data['messages'] as $msg){
    echo "Sender:".$msg['author'];
    echo "Message: ".$msg['body'];
}

Get and Parse Webhook Data with PHP

// Parse a webhook data
$data = json_decode(file_get_contents('php://input'), true);
foreach($data['messages'] as $message){
    // Handle every message here
    // Add to the database or generate a response
}

Send Message with Nodejs

var request = require('request');
// URL for request POST /message
var token = ' MIuv70gkAN';
var url = 'https://api.wha-api.com/sendMessage?token='+token;
var data = {
    phone: '38098888788', // Receivers phone
    body: 'Hello, This is my first message!'
};
// Send a request
request({
    url: url,
    method: "POST",
    json: data
});

Get All Messages with Nodejs

var request = require('request');
// URL for request POST /message
var token = ' MIuv70gkAN';
var url = 'https://api.wha-api.com/messages?token=' + token;
request(url, function (error, response, body) { // Make a GET request
if (error) return console.log(error);
// Parse a response
var data = JSON.parse(body);
// For each message
for (var i = 0; i < data.messages.length; i++) {
    var message = data.messages[i];
    console.log('Sender ' + message.author);
    console.log('Sender ' + message.body);
}
});

Get and Parse Webhook Data with Nodejs

var app = require('express')();
var bodyParser = require('body-parser');
app.use(bodyParser.json());

// POST request
app.post('/my_webhook_url', function (req, res) {
    var data = req.body; // New messages in the "body" variable
    for (var i = 0; i < data.messages.length; i++) { // For each message
        var message = data.messages[i];
        console.log(message.author + ': ' + message.body); //Send it to console
    }
    res.send('Ok');
});

app.listen(80);
    • 3 day

      Free Trial / 1 instance

      • Send and receive messages
      • Send audio, files, video
      • Always up to date
      • Easy and fast
      • 100 message sending limit

500+ Customer

More than 500 small businesses and developers are using Wha-api. Wha-api is always an ideal solution for flexible and practical solutions.

Join the wha-api family. Make the difference and stay ahead.

img

Try it free for 3 days.

We are providing free WHA-API trial for 3 days. You can send up to 200 text messages with the trial version. It can increase up to 7000 text messages per day upon purchase. Please contact with us if you need more than 3 days or more than 5 accounts for trial.