WhatsApp & SMS
API Integration
Connect WhatsApp Business API and SMS directly into your website, app, or CRM. Send templates, OTP, alerts, and bulk messages programmatically — with clean JSON endpoints, delivery callbacks, and full PHP code examples.
Two APIs, One Platform
Whether you need rich WhatsApp messaging or simple SMS, integrate in minutes with straightforward HTTPS APIs. Our Malaysian engineering team supports you through every step — at no extra charge.
WhatsApp Business API
Send pre-approved templates, OTP, files, and free-text replies. Full delivery status — Sent, Delivered, Read. Inbound webhook support.
- Template, free-text & file messages
- Handset-level delivery & read receipts
- Inbound message webhooks
SMS Gateway API
Send transactional alerts, OTP, and bulk campaigns. Modern JSON API (up to 50 personalised recipients per call) or classic HTTPS GET/POST.
- JSON & classic GET/POST endpoints
- ASCII & Unicode (Chinese, Arabic)
- Delivery status callbacks
API Reference & Examples
Switch between WhatsApp and SMS API documentation. Each includes endpoints, parameters, and ready-to-use PHP examples.
Base URLs
Three endpoint URLs are provided. We recommend using URL 2 or 3 for optimal performance and reliability in production. All use POST with application/json.
https://www.isms.com.my/isms_send_waba.phphttps://smtpapi.vocotext.com/isms_send_waba.phpRecommendedhttps://smtpapi2.vocotext.com/isms_send_waba.phpRecommendedContent-Type: application/json on every request.Message Types
Three message types are supported. Template messages (Marketing, Utility, Authentication/OTP) are charged per message and can be sent anytime. Free-text and file messages are only available within an active 24-hour user-initiated window (Service category, charged per session).
Send pre-approved Meta message templates with dynamic variable substitution.
Available anytimeSend custom free-text messages to users who recently messaged your WABA number.
Within 24-hour windowSend images, PDFs, and documents via a direct publicly accessible URL.
Within 24-hour windowRequest Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
| AppId | String | Required | Application ID from your iwsapp.my console |
| AppSecret | String | Required | Application secret from your iwsapp.my console |
| un | String | Required | Your iwsapp.my account username |
| pwd | String | Required | Your iwsapp.my account password |
| agreedterm | String | Required | Must be set to YES — confirms acceptance of Terms |
| ChannelType | String | Required | Message channel. Currently: whatsapp |
| Type | String | Required | Message type: template, message, or file |
| From | String | Required | Sender — your registered WABA number |
| To | String | Required | Recipient phone number in international format |
| TemplateCode | String | Conditional | Template code — required when Type = template |
| Language | String | Conditional | Template language code — required when Type = template |
| TemplateParams | Object | Conditional | Template variable values as JSON — when Type = template |
| Content | String | Conditional | Message text body — required when Type = message |
| fileUrl | String | Conditional | Direct public URL to file — required when Type = file |
| fileName | String | Conditional | Display name for the file — required when Type = file |
fileUrl must be a direct, publicly accessible URL. URLs behind Cloudflare or similar proxies may not be reachable by the WABA delivery system.Send Template Message
Template messages are pre-approved by WhatsApp and can be sent anytime — ideal for OTP, reminders, and transactional alerts. Charged per message.
{
"AppId": "your_app_id",
"AppSecret": "your_app_secret",
"un": "your_username",
"pwd": "your_password",
"agreedterm": "YES",
"Type": "template",
"TemplateCode": "your_template_code",
"TemplateParams": { "param1": "your value" },
"Language": "en",
"From": "your_waba_number",
"To": "recipient_number"
}
<?php
$url = "https://smtpapi.vocotext.com/isms_send_waba.php";
$data = [
"AppId" => "your_app_id",
"AppSecret" => "your_app_secret",
"un" => "your_username",
"pwd" => "your_password",
"agreedterm" => "YES",
"Type" => "template",
"TemplateCode" => "your_template_code",
"TemplateParams" => ["param1" => date("Y-m-d H:i:s")],
"Language" => "en",
"From" => "your_waba_number",
"To" => "recipient_number"
];
$ch = curl_init($url);
curl_setopt($ch, CURLOPT_HTTPHEADER, ["Content-Type: application/json"]);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
curl_setopt($ch, CURLOPT_POST, true);
curl_setopt($ch, CURLOPT_POSTFIELDS, json_encode($data));
$response = curl_exec($ch);
curl_close($ch);
echo $response;
Response Format
{
"requestId": "C9122953-...",
"statusCode": "OK",
"messageId": "20231188285..."
}
{
"statusCode": "1004",
"message": "Insufficient
credits"
}
statusCode of OK or 0 = success. Use messageId to track delivery status. Any other value indicates failure — see error codes below.
Inbound Messages (Webhook)
When a WhatsApp user messages your WABA number, we forward it to your registered webhook URL via HTTPS POST. The payload is delivered as a single response parameter, base64-encoded.
response value with base64_decode() to get the JSON message object.Common Error Codes
| Code | Description |
|---|---|
| 0 / OK | Request successful |
| 1001 | Authentication failed — check username and password |
| 1004 | Insufficient credits |
| 1008 | Missing required parameter |
| 50500 | Invalid destination phone number |
| 70502 | Insufficient WABA credits |
| 45010 | Reply time limit exceeded (outside 24h window) |
| 60006 | Template code does not exist |
Endpoints
Two ways to integrate — a modern JSON API (up to 50 personalised recipients per call) or the classic HTTPS GET/POST API. We recommend URL 1 or 2 for production.
JSON API POST · application/json
https://www.isms.com.my/isms_send_json.phpRecommendedhttps://ww3.isms.com.my/isms_send_json.phpRecommendedhttps://smtpapi.vocotext.com/isms_send_json.phphttps://smtpapi2.vocotext.com/isms_send_json.phpClassic API GET / POST · form-encoded
https://www.isms.com.my/isms_send_all_id.phpRecommendedhttps://smtpapi2.vocotext.com/isms_send_all_id.phpRecommendedhttps://smtpapi.vocotext.com/isms_send_all_id.phphttps://ww3.isms.com.my/isms_send_all_id.phpCheck Balance
https://www.isms.com.my/isms_balance_json.phpContent-Type: application/json. The classic API accepts GET and POST (form-encoded) with identical parameters.SMS Encoding Types
English, Bahasa Melayu, and other Latin-script languages. Max 153 characters per SMS credit.
Chinese, Japanese, Arabic, Korean, and other non-ASCII scripts. Max 63 characters per SMS credit.
Request Parameters (Classic API)
| Parameter | Type | Required | Description |
|---|---|---|---|
| un | String | Required | Your iwsapp.my account username |
| pwd | String | Required | Your iwsapp.my account password |
| dstno | String | Required | Destination number, international format, no + prefix. Use ; to add recipients |
| msg | String | Required | SMS message text — URL-encoded for GET requests |
| type | Integer | Required | Encoding: 1 = ASCII · 2 = Unicode |
| agreedterm | String | Required | Must be YES — confirms acceptance of Terms |
| sendid | String | Optional | Sender ID shown to recipient. Max 11 alphanumeric characters, no spaces |
Send SMS — Classic API
GET /isms_send_all_id.php HTTP/1.1 Host: www.isms.com.my ?un=myusername &pwd=mypassword &dstno=601X-XXXXXXX &msg=Hello%20World &type=1 &sendid=MyCompany &agreedterm=YES
<?php
$params = [
"un" => "myusername",
"pwd" => "mypassword",
"dstno" => "601X-XXXXXXX", // no + prefix
"msg" => "Your OTP is 123456.",
"type" => "1", // 1=ASCII 2=Unicode
"sendid" => "MyCompany", // max 11 chars
"agreedterm" => "YES"
];
$ch = curl_init("https://www.isms.com.my/isms_send_all_id.php");
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
curl_setopt($ch, CURLOPT_POST, true);
curl_setopt($ch, CURLOPT_POSTFIELDS, http_build_query($params));
$result = curl_exec($ch);
curl_close($ch);
// "2000 = SUCCESS:1143007207" or "-1001" on error
Send SMS — JSON API
The JSON API sends up to 50 recipients — each with its own personalised message — in a single request, returning structured per-recipient results.
{
"un": "myusername",
"pwd": "mypassword",
"type": "1",
"agreedterm": "YES",
"sendid": "MyCompany",
"messages": [
{ "dstno": "6016xxxxxxx", "msg": "Hi Ahmad, your order shipped!" },
{ "dstno": "6012xxxxxxx", "msg": "Hi Siti, your OTP is 4821." }
]
}
{
"total_failed": 0,
"total_credits_used": 2,
"results": [
{ "dstno":"6016...",
"code":2000,
"sms_id":"1143007207" }
]
}
{
"status": "error",
"code": -1004,
"message": "-1004 =
INSUFFICIENT CREDITS"
}
Delivery Status Callback
We push delivery status updates to your callback URL via HTTPS GET when a telco update is received.
Response Codes
| Code | Description |
|---|---|
| 2000 | SUCCESS:{TRX_ID} — message accepted & queued. Does not confirm handset delivery. |
| -1001 | Authentication failed — invalid username or password |
| -1004 | Insufficient credits |
| -1005 | Invalid SMS type — type is not 1 or 2 |
| -1008 | Missing parameter, or invalid destination number |
| -1010 | More than 50 destination numbers in one request |
| -1013 | agreedterm is not set to YES |
| -1014 | Invalid JSON format |
Integrate in Any Language
Our APIs are plain HTTPS — call them from any language or platform that can make a web request.
Simple, Transparent Pricing
No setup fees, no monthly fees. Pay per message — prepaid. Prices exclude applicable taxes.
WhatsApp Business API
Marketing from RM0.50, Utility RM0.12, Authentication RM0.10 per message, Service RM0.10 per 24-hour session.
See WhatsApp pricingSMS Gateway
Competitive per-SMS rates for Malaysia and 200+ countries. Volume-based pricing — contact us for a quote.
Get SMS rates