Legacy Receiving SMS
This document describes Reception of SMS through HTTP POST.
Our service is based on that a received message gets sent to the customer's web server, which can then develop their own services.
The client simply specifies their server address in our web interface.
Parameters
When a message is received and forwarded to the customers server, it will be sent as a HTTP POST request with the following.
Name | Description |
---|---|
FROM | Sender of the message in an international number format, such as 4512345678 |
SMS | The message itself that is received |
NUMBER | Application code or GSM number from of the sender |
Example
The customer wishes to get their messages forwarded to http://server.domain.tld:8080/receive.php.
A message has been received from +4512345678 on the application code 1272 with the text hello world.
Request would look something like this:
POST /receive.php HTTP/1.0 Host: server.domain.tld:8080 Content-type: application/x-www-form-urlencoded SMS=hello+world&FROM=4512345678&NUMBER=1272
Reply
In order to ensure a reply to the enduser, the customer can immediately return an XML document.
XML documents must contain the root tagged with "reply".
In XML, the root should also provide the tag "message".
The following parameters can be used:
Name | Description |
---|---|
price | Used for premium rates - the value of the charge should be set in Øre |
statusurl | Should contain an URL, if you wish to receive the statusreport |
returndata | A string of 255 octets, where the client can use it as their own ID |
Example
<?xml version="1.0" encoding="iso-8859-1" ?> <reply> <message>Thank you for your message</message> <price>50</price> <statusurl>http://server.domain.tld:8080/statusreport.php</statusurl> <returndata>customer choose ID</returndata> </reply>
MMS
When an MMS is received, a number of additional parameters are sent with it. However, the parameter SMS contains the first text element of the MMS, unless it is empty, it then contains the MMS subject. This means that if your service is only designed to handle multimedia, it will also work when you receive an SMS, without the need of having to analyze the extra parameters. If an MMS is sent, a request will include the following additional parameter
Name | Description |
---|---|
TYPE | This is always set to MMS |
SUBJECT | Contains the subject of the MMS message |
ATTACHMENT[] | This parameter may occur multiple times, depending on the number of attachments to the MMS messages. Each value is an URL where the file can be downloaded from. One of the attachments can be a SMIL file that contains an XML document that describes how the MMS should be displayed |
Feeling lost? Click on this link! Portal page