Sending SMS messages

Space Search
Searching Messaging API
Table of Contents

The MT SMS API provides functionality for sending SMS messages to one or more recipients. The call is triggered by either an HTTP GET or POST request to the following address:

http://gw1.roottori.fi/eapi/push

In both the POST and GET variants, the following parameters can, and in some cases must be provided as parameters to the HTTP request (i.e. in the query string part of the request URL). These parameters must be latin-1 (ISO-8859-1) encoded.

The parameters are:

Name
Alias
Notes
Description
l
login
Mandatory Username (provided during account setup) 
p
password
Mandatory
Password (provided during account setup)
msisdn
to
Mandatory. One or more may be included in the request. 
Message recipient. Multiple recipients can be specified by including multiple msisdn parameters in the request.
from
sender
Mandatory
Message originator. Can consist of max. 25 numbers or 11 alphanumeric characters (the originator field will be cut if the limit is exceeded) 
udh
-
Optional The UDH part of the message. As the UDH is a binary field, the value must be provided as a sequence of URL encoded values. Please see the examples. 
dlr
-
Optional
True/false depending on whether delivery notifications are requested. 
clientid -
Optional
Optional parameter to signal associated service. Can also be used to identify traffic for statistics and billing purposes.

When triggered using HTTP GET, the request should also include the message content in the URL as follows:

Name Alias
Notes
Description
msg - Mandatory when using the HTTP GET method. 
The message (latin-1 encoded) and properly URL escaped.
dcs - Optional
When set to "1", the message is treated as a binary message. The individual bytes should be put in the msg parameter, properly URL escaped. 

The HTTP POST method reads the content from the request body, according to the content-type specified on the request. This makes it possible to submit characters that are not part of the latin-1 character set (e.g. the Euro sign). It is highly recommended that the HTTP POST variant is used (with UTF-8 encoding). All other parameters should be passed as requests parameters (as described above), except the actual message payload. A Content-Type HTTP header should be set based on the type of content that is provided, and the actual content should be placed directly in the request body. The supported content-types are:

Content Type
Description
text/plain [charset="xxx"]
Plain text encoded with the (optionally) provided character set. If the character set is omitted, ISO-8859-1 is assumed.
application/octet-stream
For 8-bit data
text/html
As text/plain, but any tags within the content are removed.
The message content should be place as such, encoded as indicated in the content-type, in the request body. Note that this is not how browsers generally submit POST data (special encoding is used for the parameters, all of which are encoded in the request body).

The message payload can both in the POST and GET cases exceed the limits of one SMS message (e.g. 160 characters or 140 bytes). The gateway will automatically concatenate the messages, and report in its response how many parts were sent. Note that Unicode messages are currently not supported, and all textual messages are reduced to match the GSM 03.38 alphabet if needed.

Labels

 
(None)