Home/API Integration

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.

WhatsApp Business API
SMS Gateway API
JSON & HTTPS
Zero Setup Fee
2 APIs
WhatsApp + SMS
JSON
REST Endpoints
0
Setup Fees
Local
Dev Support
API Documentation

API Reference & Examples

Switch between WhatsApp and SMS API documentation. Each includes endpoints, parameters, and ready-to-use PHP examples.

Protocol: HTTPS POST / JSON Channel: WhatsApp

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.

URL 1https://www.isms.com.my/isms_send_waba.php
URL 2https://smtpapi.vocotext.com/isms_send_waba.phpRecommended
URL 3https://smtpapi2.vocotext.com/isms_send_waba.phpRecommended
All request bodies must be valid JSON. Set the header Content-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).

template

Send pre-approved Meta message templates with dynamic variable substitution.

Available anytime
message

Send custom free-text messages to users who recently messaged your WABA number.

Within 24-hour window
file

Send images, PDFs, and documents via a direct publicly accessible URL.

Within 24-hour window

Request Parameters

ParameterTypeRequiredDescription
AppIdStringRequiredApplication ID from your iwsapp.my console
AppSecretStringRequiredApplication secret from your iwsapp.my console
unStringRequiredYour iwsapp.my account username
pwdStringRequiredYour iwsapp.my account password
agreedtermStringRequiredMust be set to YES — confirms acceptance of Terms
ChannelTypeStringRequiredMessage channel. Currently: whatsapp
TypeStringRequiredMessage type: template, message, or file
FromStringRequiredSender — your registered WABA number
ToStringRequiredRecipient phone number in international format
TemplateCodeStringConditionalTemplate code — required when Type = template
LanguageStringConditionalTemplate language code — required when Type = template
TemplateParamsObjectConditionalTemplate variable values as JSON — when Type = template
ContentStringConditionalMessage text body — required when Type = message
fileUrlStringConditionalDirect public URL to file — required when Type = file
fileNameStringConditionalDisplay name for the file — required when Type = file
The 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.

JSONRequest Body
{
  "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"
}
PHPsend_template.php
<?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

Success
{
  "requestId": "C9122953-...",
  "statusCode": "OK",
  "messageId": "20231188285..."
}
Error
{
  "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.

POST https://{your-url}?response={base64_payload}
Contact sales@mobiweb.com.my to register your webhook URL. Decode the response value with base64_decode() to get the JSON message object.

Common Error Codes

CodeDescription
0 / OKRequest successful
1001Authentication failed — check username and password
1004Insufficient credits
1008Missing required parameter
50500Invalid destination phone number
70502Insufficient WABA credits
45010Reply time limit exceeded (outside 24h window)
60006Template code does not exist
JSON / Plain Text HTTPS GET / POST

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

URL 1https://www.isms.com.my/isms_send_json.phpRecommended
URL 2https://ww3.isms.com.my/isms_send_json.phpRecommended
URL 3https://smtpapi.vocotext.com/isms_send_json.php
URL 4https://smtpapi2.vocotext.com/isms_send_json.php

Classic API GET / POST · form-encoded

URL 1https://www.isms.com.my/isms_send_all_id.phpRecommended
URL 2https://smtpapi2.vocotext.com/isms_send_all_id.phpRecommended
URL 3https://smtpapi.vocotext.com/isms_send_all_id.php
URL 4https://ww3.isms.com.my/isms_send_all_id.php

Check Balance

URLhttps://www.isms.com.my/isms_balance_json.php
All hosts are HTTPS only. The JSON API requires POST with Content-Type: application/json. The classic API accepts GET and POST (form-encoded) with identical parameters.

SMS Encoding Types

type = 1 · ASCII

English, Bahasa Melayu, and other Latin-script languages. Max 153 characters per SMS credit.

type = 2 · Unicode

Chinese, Japanese, Arabic, Korean, and other non-ASCII scripts. Max 63 characters per SMS credit.

Messages exceeding the per-part character limit are automatically split and billed as multiple SMS credits.

Request Parameters (Classic API)

ParameterTypeRequiredDescription
unStringRequiredYour iwsapp.my account username
pwdStringRequiredYour iwsapp.my account password
dstnoStringRequiredDestination number, international format, no + prefix. Use ; to add recipients
msgStringRequiredSMS message text — URL-encoded for GET requests
typeIntegerRequiredEncoding: 1 = ASCII · 2 = Unicode
agreedtermStringRequiredMust be YES — confirms acceptance of Terms
sendidStringOptionalSender ID shown to recipient. Max 11 alphanumeric characters, no spaces

Send SMS — Classic API

HTTPGET Request
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
PHPsend_sms.php (POST — recommended)
<?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.

JSONRequest Body
{
  "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." }
  ]
}
Success
{
  "total_failed": 0,
  "total_credits_used": 2,
  "results": [
    { "dstno":"6016...",
      "code":2000,
      "sms_id":"1143007207" }
  ]
}
Error
{
  "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.

GET https://{your-url}?msisdn={dstno}&trx_id={trx_id}&dn_status={status}
SMS delivery scope (Malaysia): SMS statuses (DELIVERED, ACCEPTED, SENT) reflect acknowledgement by the Telco SMSC only — not delivery to the recipient's handset. Malaysian telcos do not provide handset-level delivery reports by default. For confirmed Sent → Delivered → Read tracking at handset level, we recommend WhatsApp Business API, which natively supports full status callbacks.

Response Codes

CodeDescription
2000SUCCESS:{TRX_ID} — message accepted & queued. Does not confirm handset delivery.
-1001Authentication failed — invalid username or password
-1004Insufficient credits
-1005Invalid SMS type — type is not 1 or 2
-1008Missing parameter, or invalid destination number
-1010More than 50 destination numbers in one request
-1013agreedterm is not set to YES
-1014Invalid JSON format
Works Everywhere

Integrate in Any Language

Our APIs are plain HTTPS — call them from any language or platform that can make a web request.

PHP
Python
Node.js
Java
C# / .NET
Go
Ruby
cURL / Shell
Pricing

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 pricing

SMS Gateway

Competitive per-SMS rates for Malaysia and 200+ countries. Volume-based pricing — contact us for a quote.

Get SMS rates
No Setup Fee No Monthly Fee Prepaid — Pay As You Go Free Integration Support

Ready to Integrate?

Our Malaysian engineering team helps you connect WhatsApp and SMS APIs — at no extra charge. Get your credentials and start sending.