Send WhatsApp text (v1)

Legacy APIs - WhatsApp
Legacy WhatsApp API We only offer this type of WhatsApp API to customers who specifically request it. We have now moved to the official WhatsApp. To use official WhatsApp, contact us on WhatsApp +265992026866.
Starting a new integration? This is a legacy API. It stays available for existing integrations, but new integrations should use the SMS V3 APIs.

Send a WhatsApp text message to a phone number.

POSThttps://telcomw.com/api-v2/v1.wa.text

Send key, password and appid as headers, and the message as a JSON body.

Parameters

Parameter Sent in Required Description
key header YES Your API key.
password header YES Your account password.
appid header YES The id of your WhatsApp app.
phone body YES The phone number to send to, with the country code.
message body YES The message.

Example request

curl --location --request POST 'https://telcomw.com/api-v2/v1.wa.text' \
  --header 'key: YOUR_API_KEY' \
  --header 'password: YOUR_PASSWORD' \
  --header 'appid: YOUR_APP_ID' \
  --header 'Content-Type: application/json' \
  --data '{
  "phone": "+265992026866",
  "message": "Boss?"
}'
curl --location --request POST "https://telcomw.com/api-v2/v1.wa.text" ^
  --header "key: YOUR_API_KEY" ^
  --header "password: YOUR_PASSWORD" ^
  --header "appid: YOUR_APP_ID" ^
  --header "Content-Type: application/json" ^
  --data "{\"phone\":\"+265992026866\",\"message\":\"Boss?\"}"
<?php

$headers = [
    'key: YOUR_API_KEY',
    'password: YOUR_PASSWORD',
    'appid: YOUR_APP_ID',
    'Content-Type: application/json',
];

$data = [
    'phone' => '+265992026866',
    'message' => 'Boss?'
];

$ch = curl_init('https://telcomw.com/api-v2/v1.wa.text');
curl_setopt($ch, CURLOPT_CUSTOMREQUEST, 'POST');
curl_setopt($ch, CURLOPT_HTTPHEADER, $headers);
curl_setopt($ch, CURLOPT_POSTFIELDS, json_encode($data));
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
$response = curl_exec($ch);
curl_close($ch);

print_r(json_decode($response, true));
const axios = require('axios');

axios.request({
  method: 'post',
  url: 'https://telcomw.com/api-v2/v1.wa.text',
  headers: {
    'key': 'YOUR_API_KEY',
    'password': 'YOUR_PASSWORD',
    'appid': 'YOUR_APP_ID',
    'Content-Type': 'application/json'
  },
  data: {
    "phone": "+265992026866",
    "message": "Boss?"
  }
}).then((res) => console.log(res.data))
  .catch((err) => console.error(err.response ? err.response.data : err.message));
import requests

headers = {
    'key': 'YOUR_API_KEY',
    'password': 'YOUR_PASSWORD',
    'appid': 'YOUR_APP_ID',
    'Content-Type': 'application/json'
}
payload = {
    'phone': '+265992026866',
    'message': 'Boss?'
}

response = requests.request('POST', 'https://telcomw.com/api-v2/v1.wa.text', headers=headers, json=payload)
print(response.json())

Response

The response is JSON.

{
  "status": 200,
  "message": "Your message was sent successfully!",
  "ref": null
}