# GET method send SMS

```
https://app-sms.online-live-support.com/api/send.php?apiKey=[APIKEY]&recipients=[RECIPIENTS]&messageContent=[MESSAGE]&referenceID=[CUSTOMREFERENCEID]
```

| \[APIKEY]            | API Key. (Find your API key at <https://app-sms.online-live-support.com/dashboard.php> My Account > Settings)                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            |
| -------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| \[RECIPIENTS]        | <p>Recipient mobile number.<br>- Mobile number with country code.<br>- Once recipient one request.<br>- One recipient one request.<br>- You can use semi-colon(;) to separate each recipient without space when sending multiple recipients.</p>                                                                                                                                                                                                                                                                                                                                                         |
| \[MESSAGE]           | <p>Message body.<br>- A single SMS may contain 160 characters, or 70 characters for Unicode.<br>- Concatenated SMS may contains 152 characters, or 63 characters for Unicode.<br>- All Malaysia mobile number will be minus 7 characters “RM0.00” at the beginning of each SMS content.<br>- Maximum of 10 concatenated SMS.<br><br><strong>As per SKMM guidelines, you shall include price information at the beginning of each SMS. You shall use either “Free msg/RM0.00/Msj ini percuma” at the beginning of the SMS content. For more information, please read our Terms & Conditions.</strong></p> |
| \[CUSTOMREFERENCEID] | An unique reference id from your system to avoid duplicate request.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      |
| \[STATUS]            | Show the status for send SMS (**ok** / **error**)                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        |
| \[MSGCODE]           | Show code to represent particular status.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                |
| \[REFERENCEID]       | Your reference for any future enquiries.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                 |
| \[BALANCE]           | Your account current balance.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            |
| \[DATA]              | Each recipient sending reference ID.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                     |

## Request and Response format

**Encourage to use URL encode on the request link / url to converts reserved, unsafe, and non-ASCII characters in URLs to a format that is universally accepted and understood by all web browsers and servers. Paste it here and encode link**

**Please refer to here to know more about url encoding characters reference**

**Request**

<https://app-sms.online-live-support.com/api/send.php?apiKey=\\[APIKEY]\\&recipients=\\[RECIPIENT]\\&messageContent=\\[MESSAGE]\\&referenceID=\\[CUSTOMREFERENCEID>]

**Encoded Request**

https%3A%2F%2Fapp-sms.online-live-support.com%2Fapi%2Fsend.php%3FapiKey%3D %5BAPIKEY%5D%26recipients%3D%5BRECIPIENT%5D%26messageContent%3D %5BMESSAGE%5D%26referenceID%3D%5BCUSTOMREFERENCEID%5D

**Response**

{"status":"\[STATUS]","msgCode":"\[MSGCODE]","statusMsg":"\[ STATUSMSG]","referenceID":"\[ REFERENCEID]"," balance":"\[ BALANCE]", "data": "\[DATA]" }\
\
&#x20;\*Response array encoded with **JSON**\
\ <br>

## Example code for request and response

**Request**

* **Single recipient**\
  &#x20;<https://app-sms.online-live-support.com/api/send.php?apiKey=22f277843206d477d3cd4ae1c9220bc3\\&messageContent=Testing%123\\&recipients=> 6010xxxxxxx\&referenceID=ba63ht12opab6
* **Multiple recipients**\
  &#x20;<https://app-sms.online-live-support.com/api/send.php?apiKey=22f277843206d477d3cd4ae1c9220bc3\\&messageContent=Testing%123\\&recipients=> 6010xxxxxxx;6012xxxxxxx\&referenceID=iyr340hbc6ja0b

**Encoded Request**

* **Single recipient**\
  &#x20;https%3A%2F%2Fapp-sms.online-live-support.com%2Fapi%2Fsend.php%3F apiKey%3D22f277843206d477d3cd4ae1c9220bc3%26messageContent%3D Testing%25123%26recipients%3D6010xxxxxxx%26referenceID%3Dba63ht12opab6
* **Multiple recipients**\
  &#x20;https%3A%2F%2Fapp-sms.online-live-support.com%2Fapi%2Fsend.php%3F apiKey%3D22f277843206d477d3cd4ae1c9220bc3%26messageContent%3D Testing%25123%26recipients%3D6010xxxxxxx%3B6012xxxxxxx%26referenceID%3Diyr340hbc6ja0b

**Response**

* **Single recipient - Successful**\
  &#x20;{"status":"ok","msgCode":"E00001","statusMsg":"Completed successfully.","referenceID":\["q5c502192aa869"],"balance":8901,"data":\[{"recipients":"6010xxxxxxx","referenceID":"q5c502192aa869"}]}
* **Multiple recipients - Successful**\
  &#x20;{"status":"ok","msgCode":"E00001","statusMsg":"Completed successfully.","referenceID":\["q5c5021c306a95","q5c5021c306ae8"],"balance":8901,"data":\[{"recipients":"6010xxxxxxx","referenceID":"q5c5021c306a95"},{"recipients":"6012xxxxxxx","referenceID":"q5c5021c306ae8"}]}
* **Unsuccessful**\
  &#x20;{"status":"error","msgCode":"E00242","statusMsg":"invalid recipient(s).","invalidRecipients":\["6010999999999"]}

\*Response array encoded with **JSON**<br>

## Status Code List

| Status Code | Description                                          |
| ----------- | ---------------------------------------------------- |
| E00001      | Completed successfully.                              |
| E00081      | Account not active yet. Please contact our support.  |
| E00242      | Invalid recipient(s).                                |
| E00243      | Please enter your message.                           |
| E00249      | Maximum 10 SMS per recipient(s).                     |
| E00248      | Please enter at least one recipient.                 |
| E00250      | Insufficient balance.                                |
| E00253      | Maximum 100 recipient(s).                            |
| E00359      | Invalid API Key.                                     |
| E00366      | The message content contains international brand(s). |
| BE00035     | The message not allow to send without company name.  |
| BE00036     | The message not allow to send without whitelisted.   |
| BE00096     | Duplicated reference id found.                       |
| BE00128     | Completed successfully(low balance).                 |
