API

The API is based on HTTP protocol.

It is viable to use HTTPS as the traffic cannot be sniffed and duplicated/faked. However, be aware of untrusted certificate on our side for this moment!

The API consists of 2 parts:

1) Receiving SMS

If you just want to receive SMS and send respond, we would need you to setup an HTTP API, which will receive requests and any text sent back will be interpreted as SMS MT.

API URL Example:

https://www.someurl.com/subscriptions.aspx?smsc=%i&svc=%n&s=%p&r=%P&text=%a

parameters passed to you:

  • smsc – ID of the SMS Center
  • svc – name of the service
  • s - originator
  • r – recipient
  • text – actual message

Your response must contain following HTTP headers :

  • X-Kannel-From:Originator of the message – recipient of the request
  • X-Kannel-To: Recipient of the message – originator of the request.
  • X-Kannel-SMSC: SMS Gateway to be used – MUST BE PASSED FROM REQUEST.
  • X-Kannel-Service: Service – MUST BE PASSED FROM REQUEST.

Everything you will return in body will be stripped to first \r\n sequence and sent to end-user. Your script must return answer within 60 seconds, otherwise the message will be posted again.

2) Sending SMS

Is realised via HTTP POST to: http://site.demoru.com/api.php?a=msg&api_id=XXXX (where api_id you will get assigned)

Form parameters:

  • smsc – SMS center to be sent through – use assigned one
  • s – sender of the message (can be alphanumeric)
  • r – recipient list, comma delimited MSISDN with + instead of 00 prefix
  • text – text – ASCII character table supported at this time only
  • dlr – an URL to which will be passed notification – NOT USED FOR THIS MOMENT
  • send – put there any value, as the field is used as GO for the service

The response will be HTML table, with phone numbers and their sent message statuses.
Available responses (Returned Value – explanation):

  • 0 – Accepted for delivery – The message has been accepted and is delivered onward to a SMSC driver. Note that this status does not ensure that the intended recipient receives the message.
  • 3 – Queued for later delivery – The bearerbox accepted and stored the message, but there was temporarily no SMSC driver to accept the message so it was queued. However, it should be delivered later on.
  • Anything else returned report to us.
  1. No comments yet.

  1. No trackbacks yet.

Security Code: