Sending SMS
The API for sending sms is specified below:
http://www.supertextng.com/api.php?username=[username]&password=[password]&destination=[destination]&message=[message]&sender=[sender]
To deliver to DND numbers; add the option
&nodnd=yes
On successful send operation the following code will be returned;
SENT:[number of units consumed] e.g. SENT:2 (SENT in uppercase followed by a full colon, then by the number of sms units used).
The meaning of the url parameters and returned error codes are explained below.
Checking Credit Balance
To check sms credit balance, use the following api(only your username and password are required):
http://www.supertextng.com/getbalance.php?username=[username]&password=[password]
Successful checking operation will return the following;
BALANCE:[sms units balance] e.g. BALANCE:702 (BALANCE in uppercase followed by a full colon, then by the sms credit balance, 702 in this case).
Url Parameters
Here are some notes on the api url parameters, note that you should not include the square brackets when using the api's.
username : Your supertextng.com account username
password : Your supertextng.com account password
destination : the recipient's phone number in the usual or international format. Only one number is permitted in the API, you will normally write a loop if you want to send sms to multiple numbers.
message : the text message you want to send.
sender : the sender ID to appear on recipient's phone. Maximum of 11 characters as usual, if more than 11 characters, the first 11 characters will be used.
Example :
http://www.supertextng.com/api.php?username=user007&password=xyz123&destination=08053425363&message=Hello&sender=Superman
Error CodesThe returned codes on success have already been given above. Error codes and their meanings are given below.
100 : One or more required url parameter is missing or misspelt.
101 : Username is blank.
102 : Password is blank.
103 : Destination is blank.
104 : Message is blank.
105 : Sender is blank.
200 : Wrong username or password.
201 : Account has not been activated.
202 : Inactive account.
300 : Insufficient credit.
400 : Failed delivery(no credit deducted).
Hint : Error code starting with 1 implies a missing value. Error code starting with 2 implies problem with specified user account.