Step 1 – Sending message

The OTP SMS is transmitted by calling a URL with 5 mandatory parameters and several optional ones:

Parameter

Type

Description

user

Mandatory

The username provided by tyntec.

password

Mandatory

The password provided by tyntec.

sender

Mandatory

This will be displayed as the originator of the message on the mobile phone.

receiver

Mandatory

The receiver of the message in international format, i.e. a leading “+” or “00”. The plus sign needs to be URL encoded.

content

Mandatory

The content of the message.

requestDLR

Optional

Request a Delivery Receipt (DLR).

showMsgIDs

Optional

Request a unique Message ID.

messagetype

Optional

Possible values:

  • sms_simple: Plain text message (this is the default value if you don’t set the parameter)
  • sms_flash: The message will be shown on the display of the handset immediately and will usually not be stored on the handset.
  • sms_unicode: The message is encoded using the Unicode character set. The value of the content parameter must be encoded in hexadecimal format.
  • sms_raw: Used for binary messages. The value of the content parameter must be encoded in hexadecimal format.
  • sms_concat: The short message is a part of a concatenated message. The content of the message must contain a concat header to ensure that parts are displayed on the handset together as one message.

dataCoding

Optional

Possible values:

  • 0 for GSM7
  • 1 for ASCII
  • 3 for Latin-1 (ISO-8859-1)
  • 8 for Unicode
  • 4 for binary SMS

protocolID

Optional

This feature enables the setting of the protocol ID as per GSM 3.40 documentation. It is commonly used for sending binary SMS.

senderTON

Optional

Set the Type of Number of the sender parameter. Possible values are listed in the SMPP specifications.

senderNPI

Optional

Set the Numbering Plan Indicator of the sender parameter. Possible values are listed in the SMPP specifications.

deliverStart

Optional

Defines when the first delivery attempt will be made. If this parameter is not used, the delivery will be immediate.

The time must be given in the following format: YYYYMMDDhhmmss[+-], meaning:

  • „YYYY“ is the year, in 4 digits
  • „MM“ is the month in digits, with „01“ being January
  • „DD“ is the day of the month, ranging from „01“ to „31“
  • „hh“ is the hour, based on a 24-hour time format, e.g. 10 PM being 22
  • „mm“ is the minute of the hour
  • „ss“ is the second(s)
  • [+-] is the GMT-Offset of the specified time in „hhmm“, e.g. GMT+2 would be specified as „+0200“. The time has to be URL-Encoded, i.e. a „+“ has to be converted to „%2b“ and a „-“ to „%2d“

Time format example 1: Setting the deliverStart to January 2, 2009, 10 AM UTC time would be: 20090102100000%2b0000.

Time format example 2: Setting the deliverStart to May 18, 2008, 2:36 PM CEST time would be:20080518143600%2b0200.

deliverEnd

Optional

Defines when the last delivery attempt will be made. If this parameter is not used, the message will be retried up to 48 hours after the first attempt.

The same format as for deliverStart applies.


The following parameters are optional:

http://sms.tyntec.com:4887/http/send?user=testuser&password=testpassword&messagetype=sms_simple&senderTON=1&senderNPI=1&receiver=0044762123123123&sender=00444762123123&content=This%20is%20a%20test&showMsgIDs&requestDLR

This is an example URL including Request of Message ID and Delivery Receipt. Please note that the login “testuser” with password “testpassword” is not valid on the tyntec system.

If you want to choose HTTPS, please use port 8443 instead of 4887.

Please note that all parameters have to be properly URL encoded. For further information, please refer to the following URL: http://www.w3schools.com/tags/ref_urlencode.asp