Table of Contents    

 

Inbound SMS API

  Introduction
  Application Development
     ON RECEIVE - Inbound SMS
     ON ERROR

 Introduction    

This API will allow the receiving of inbound SMS messages in real time. The API is provided in the form of a HTTP GET mechanism, i.e. directSMS' system will forward all inbound SMS messages to a specified URL as soon as they are received.

Table of Contents





 ON RECEIVE - Inbound SMS    

On reception of a new Inbound SMS message, a HTTP GET call is made to the URL specified on the Inbound SMS page with the parameters outlined below. This page can be accessed by clickin the "sms tools" -> "inbound sms" menu once you log in.

inbound_number: This will be the inbound number you are leasing from directSMS, this will represented in International format e.g. 61429007007.
id: This is the Id of the inbound message within directSMS' systems e.g. 6df259577165fd4c7fa6ba0cc8fa41d5.
message_text: The text of the SMS message. This will be URL encoded.
mobile: The mobile number of the SMS message sender. Again, this will be presented in International format e.g. 61412345678 instead of 0412 345 678.
when: The number of seconds since this SMS was received. For example, if the message was received by directSMS' gateway 2 seconds ago, this value will be 2.

Example

1. You have leased the inbound number 0428 001 001 for an SMS competion.
2. On the Inbound SMS page, you have selected to send a HTTP GET on http://www.mywebsite.com/process_sms?security_option=xyz
3. A customer has decided to enter your SMS competition by sending an SMS with his name and post code to the competition hotline. The customer sends the SMS "John Citizen 2001".
4. The directSMS gateway makes the following HTTP GET call: http://www.mywebsite.com/process_sms?security_option=xyz&
   id=6df259577165fd4c7fa6ba0cc8fa41d5&
   inbound_number=61428001001&message_text=John+Citizen+2001&
   mobile=61444123123&when=1

Table of Contents





 ON ERROR    

Should the call to the URL specified fail in any way, the gateway will attempt to deliver the message again every 20 minutes until the message is successfully delivered.

This is why the "when" parameter is important.

Table of Contents