TriWebSMS

Using HTTP API

USING API TO SEND SMS ON TRIWEBSMS INFRASTRUCTURE

TriWebSMS's HTTP API is a simple and flexible way of integrating SMS functionality with your website or application. With the API your can:

  1. Send SMS to single mobile number
  2. Send SMS to multiple mobile numbers
  3. Schedule SMS to be sent at a later time.

Getting started is quick and easy. All you need is a user account on TriWebSMS.com.

Get a user account now by clicking on Register link on the left hand side of the page.


Getting Started

Examples

Response Codes


Getting Started

To use the API, create the URL using this schema:

http://www.triwebsms.com/sendsms.php?user=USERNAME&password=PASSWORD&mobile=MOBILE_NUMBER&senderid=SENDER_NAME&message=MESSAGE&schedule=SCHEDULE_DATE

 

Please note that the exact order of the parameters of URL above must be preserved when you use it in your website or application

 

The value of the parameters in the URL are as follows:

USERNAME: your SMS account username on TriWebSMS. This field is compulsory.

PASSWORD: your SMS account password on TriWebSMS. This field is compulsory.

MOBILE_NUMBER: the mobile number of the recipient. The number must be prefixed with the country code eg 234 for Nigeria.

If you are sending to more than one recipient, separate the numbers with commas. For example: 2348012345678,2348012345679,2348012345670

This field is compulsory.

SENDER_NAME: the sender name to use. This field is compulsory.

MESSAGE: your SMS message of 160 characters or less. This field is compulsory.

SCHEDULE_DATE: the schedule date you want the SMS to be sent. The format of the date must be that of 2012-08-15 15:08:22, that is Y-m-d H:m:s. This field is optional.

 

Examples

Below are examples of 3 scenarios where the API is used and the corresponding HTTP API URL for each scenario.

 

Example 1: Send an SMS to one mobile number

In this example, the parameter values are as follows:

user is demouser

password is demopass

senderid is DEMO

message is This is a demo

mobile is 2348012345678

 

HTTP API URL

http://www.triwebsms.com/sendsms.php?user=demouser&password=demopass&mobile=2348012345678&senderid=DEMO&message=This is a demo

 

Example 2: Send an SMS to multiple mobile numbers

In this example, the parameter values are as follows:

user is demouser

password is demopass

senderid is DEMO

message is This is a demo

mobile is 2348012345678,2348012345679,2348012345670

 

HTTP API URL

http://www.triwebsms.com/sendsms.php?user=demouser&password=demopass&mobile=2348012345678,2348012345679,2348012345670&senderid=DEMO&message=This is a demo

 

Example 3: Send a scheduled SMS to multiple mobile numbers

user is demouser

password is demopass

senderid is DEMO

message is This is a demo

mobile is 2348012345678,2348012345679,2348012345670

schedule is 2012-08-15 15:08:22

 

HTTP API URL

http://www.triwebsms.com/sendsms.php?user=demouser&password=demopass&mobile=2348012345678,2348012345679,2348012345670&senderid=DEMO&message=This is a demo&schedule=2012-08-15 15:08:22

 

Response Codes

When you send an SMS using the HTTP API, your website or application will get one of the following response codes from TriWebSMS:

Response Code

Meaning

1111:SUCCESS:SMS Submitted Successfully

The SMS was sent successfully

1111:SUCCESS:SMS Scheduled Successfully

The SMS was successfully scheduled to be sent later. This will apply where the “schedule” parameter is passed in the API URL

1001:ERROR:Invalid URL

The API URL is invalid. Most likely one or more parameters are missing or wrongly input.

1005:ERROR:Invalid value in username or password field

SMS account username or password incorrect

1010:ERROR:Account expired

SMS account has expired. Contact TriWebSMS to re-activate it.

1015:ERROR:Insufficient SMS Credits

You do not have sufficient SMS credit

1020:ERROR:Invalid Sender

Sender name is invalid. Most likely the sender name exceeds 11 characters

1025:ERROR:Invalid Schedule Time

The format of the schedule is either wrong or in the past.

1050:ERROR:Other error messages

An unexpected error occurred. If this happens attempt the API request later or contact This e-mail address is being protected from spambots. You need JavaScript enabled to view it

1030:ERROR:Account doesn’t exist

You do not have an account on TriWebSMS. Go to http://triwebsms.com to create one

1035:ERROR:Character count is greater than x

The SMS message has exceeded 160 characters.

 

If you have any questions send an email to This e-mail address is being protected from spambots. You need JavaScript enabled to view it or call +2348098438703