Intobo WhatsApp API

FREEMIUM
Par oz | Mise à jour 2 months ago | Communication
Popularité

7 / 10

Latence

850ms

Niveau de service

100%

Health Check

N/A

Retour à tous les tutoriels (2)

How can I send a message?

We assume that your whatsApp account is connected to be able to send messages.

If you haven’t made an account connection, “How to connect WhatsApp account?” review out the tutorial

We will use the “SendMessage” endpoint to send messages

Required parameters:

  • number_id (In our scenario, this value is 14585) “For details “How to connect WhatsApp account?” review out the tutorial”
  • to_number (The phone number to which the message will be sent. It must be entered including the country code. For example: 919677713222)
  • message_text

Our request code will look like this

$curl = curl_init();

curl_setopt_array($curl, [
CURLOPT_URL => “https://intobo-whatsapp-api1.p.rapidapi.com/SendMessage/14585”,
CURLOPT_RETURNTRANSFER => true,
CURLOPT_FOLLOWLOCATION => true,
CURLOPT_ENCODING => “”,
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => “POST”,
CURLOPT_POSTFIELDS => “{\r
"to_number”: “919677713222”,\r
"message_text": “hello world!”\r
}",
CURLOPT_HTTPHEADER => [
“X-RapidAPI-Host: intobo-whatsapp-api1.p.rapidapi.com”,
“X-RapidAPI-Key: YOUR_API_KEY”,
“content-type: application/json”
],
]);

response=curlexec(response = curl_exec(curl);
curl_close($curl);

API Response looks like this

{
“status”: “success”,
“message”: “Message queued successfully.”,
“message_id”: “145861670527682”
}

You can query the status of the message using the “GetMessage” endpoint with the message_id parameter.