Developers can use our HTTP API to easily integrate SMS to their systems and applications.

CHECK BALANCE

https://longcodesng.com/http/balance?username=x&password=x

username = registered phone number
password = API key
Log in to your dashboard to view your API key.

Response:
The response is made up of code and value which are separated by a pipe (|);
Successful: 1000|amount
Failed: 1001|reason

HOW TO RECEIVE SMS AT YOUR URL

We push the data to your URL via POST variables.

For PHP Developers:
This is how to receive the data at your URL; $_POST[‘phone’] and $_POST[‘message’]

$_POST[‘phone’] = phone number that sent message
$_POST[‘message’] = message sent

For ASP Developers:

This how to receive the data at your URL; Request.QueryString[“phone”] and Request.QueryString[“message”]

Request.QueryString[“phone”] = phone number that sent message
Request.QueryString[“message”] = message sent

SEND SMS

We have 2 SMS routes on LongcodesNG; normal and corporate.
The normal route delivers SMS to all mobile networks but cannot deliver to DND (Do Not Disturb) numbers but the corporate route can deliver to DND numbers. Please see pricing and features here

https://longcodesng.com/http/bulksms?username=x&password=x&message=x&sender=x&mobile=xx&route=x

username = registered phone number
password= API key
message = message to send
mobile = recipients format e.g 081xxx,080xxx,070xxx. Separate multiple numbers with comma
sender = caption to display to recipients. Max of 11 characters
route = 1 (normal), 2 (corporate)

Response:
The response is made up of code, phone, reason which are separated by a pipe (|);
Delivered: 2001|phone|message sent
Error: 2002|error|reason
Error: 2002|phone|reason

For bulk SMS request, response is separated by comma then pipe. For instance, you send SMS to 3 numbers at once the response will be as below;
2001|phone1|message sent, 2002|phone2|Do Not Disturb(DND) rejected, 2001|phone3|message sent