SMS Api
SMS Api
API 2016
SMS123
API Documentation
1
SMS123
API
2016
<sendType></sendType> - random
(Malaysia ONLY, Recipient will receive SMS from a mobile
number.)
- shortCode
(Short Code / High Quality SMS)
- longCode
(Recipient will receive SMS from a 10-digit number.)
- longCode2
(Recipient will receive SMS from a 10-digit number.)
2
SMS123
API
2016
<reference></reference> You can keep this number for your reference if in the future you
have any enquiries.
Error list
1316 Non-Malaysia IP detected. Kindly contact our support for further assistance. Thank
you.
3
SMS123
API
2016
1603 Cannot send more then 10 SMS. Max 10 SMS only. For 'a','b','c' character max
1520 words, for Unicode character max 630 words.
1607 You do not have enough SMS Credit for this campaign. You need an additional of
SMS Credit(s) :
Request
<root>
<command>[COMMAND]</command>
<sendType>[SEND_TYPE]</sendType>
<email>[EMAIL]</email>
<password>[PASSWORD]</password>
<params>
<items>
<recipient>[RECIPIENT]</recipient>
<textMessage>[SMS_CONTENT]</textMessage>
</items>
</params>
</root>
Response
<root>
<validate>[ACCOUNT_VALIDATE_STATUS]</validate>
<status>[API_STATUS]</status>
<msgCode>[MESSAGE_CODE]</msgCode>
<msg>[MESSAGE]</msg>
<data/>
<balance>[CREDIT_BALANCE]</balance>
<reference>[REFERENCE]</reference>
</root>
4
SMS123
API
2016
$xml = "<root>";
$xml .= "<command>sendPrivateSMS</command>";
$xml .= "<sendType>longCode</sendType>";
$xml .= "<email>[email protected]</email>";
$xml .= "<password>sms123</password>";
$xml .= "<params>";
$xml .= "<items>";
$xml .= "<recipient>60180000000; 60180000000</recipient>";
$xml .= "<textMessage>";
$xml .= htmlspecialchars("welcome to my world.");
$xml .= "</textMessage>";
$xml .= "</items>";
$xml .= "</params>";
$xml .= "</root>";
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, $URL);
curl_setopt($ch, CURLOPT_POST, 1);
curl_setopt($ch, CURLOPT_POSTFIELDS, $xml);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
curl_setopt($ch, CURLOPT_CONNECTTIMEOUT, 0);
curl_setopt($ch, CURLOPT_HTTPHEADER, array('Content-Type: text/xml'));
$response = curl_exec($ch);
curl_close($ch);
echo $response;
?>
Response
<root>
<validate>1</validate>
<status>1</status>
<msgCode>1609</msgCode>
<msg>Private SMS has been sent.</msg>
<data />
<balance>3434.35</balance>
<reference>12563</reference>
</root>
5
SMS123
API
2016
[COMMAND] - sendRandom
(Malaysia ONLY, Recipient will receive SMS from a mobile
number.)
- sendShortCode
(Short Code / High Quality SMS)
- sendLongCode
(Recipient will receive SMS from a 10-digit number.)
- sendLongCode2
(Recipient will receive SMS from a 10-digit number.)
6
SMS123
API
2016
[REFERENCE] You can keep this number for your reference if in the future you
have any enquiries.
Error list
1316 Non-Malaysia IP detected. Kindly contact our support for further assistance. Thank
you.
1603 Cannot send more then 10 SMS. Max 10 SMS only. For 'a','b','c' character max
1520 words, for Unicode character max 630 words.
7
SMS123
API
2016
1607 You do not have enough SMS Credit for this campaign. You need an additional of
SMS Credit(s) :
Response
[STATUS] ## [MESSAGE] ## [REFERENCE] ## [BALANCE] ## [MESSAGE_CODE]
*You can split the response by " ## ".
Response
GOOD ## Private SMS has been sent. ## 424278 ## 10000.00 ## 1609