Using HTTP / HTTPS standard interface
Bulk SMS MT Submission from client
In order to transmit delivery requests,
you should send requests to either:
- HTTP Reception Gateway
http://www.truesenses.com/cgi-bin/
smsgateway.cgi
- HTTPS Reception Gateway
https://secure.simmcomm.ch/cgi-bin/
smsgateway.cgi
MT Transmission parameters
The HTTP POST transmission string is composed of
keywords with associated values, separated by
equals sign (=). All such keyword=value pairs are
connected with standard HTTP POST character &.
The hole HTTP request should be URL encoded.
The MT request consists of the following parameters:
- CMD
(Fixed command value)
Value: SENDMESSAGE
- ACCOUNT
(Your account name)
Example: MyAccount
- PASSWORD
(Your account password)
Example: MyPassword
- NUMBER
(Recipient number; same format as on MO
delivery)
Example: 0041791234567
- MESSAGE
(MT Message text, URL-encoded)
Example: “The+weather+in+Zurich+is+20+degrees."
Optional parameters
- ORIGIN
(Sender ID, numeric with optional + sign
or alphanumeric ID of up to 11 characters)
Example: +41791234567
Example: MyownID
- FLASH=ON
If this parameter is passed, the SMS will appear directly as a paging alert on the mobile phone (the exact presentation depends on the make/model of the receiving phone).
- TEST=ON
If this parameter is passed, the SMS won't be sent and the gateway will return TESTMODE instead of a YYMMDDHHMMSS MESSAGEID.
This can be used for performing an integration test of the interface.
MT Result codes
Upon reception of the MT POST transmission string,
the gateway will respond back with one of the following
possible result codes:
- 01 SENT YYMMDDHHMMSS
The message was successfully accepted and
forwarded to the operator for delivery
YYMMDDHHMMSS corresponds to the
assigned MESSAGEID.
- 11 SYNTAX ERROR
Error: Wrong format of SMS.
Eg. NUMBER or ORIGIN invalid or
MESSAGE too long.
- 90 INVALID ACCOUNT
Error: The account doesn’t exist
- 91 INVALID PASSWORD
Error: The password is incorrect
- 92 INVALID PARAMETERS
Error: Mandatory parameters are missing
- 93 NO AMOUNT LEFT
Error: Not enough prepay credits
- 94 UNTRUSTED HOST
Error: Sending Host is not granted access
For self service accounts, you can configure the trusted hosts from within the administration section.
- 95 INVALID DESTINATION NUMBER
Error: Recipient number mismatch
- 97 RECIPIENT BLOCKED
Error: Recipient is blacklisted
Shell script examples using CURL
You can use any software or programming language for accessing the HTTP / HTTPS interface. Below we are providing example scripts of the most basic part, using CURL for the transmission.
For the script examples, you will need to install the CURL version corresponding to your operating system:
- Visit the CURL download page and download the version for your needs
Shell scripts for SMS transmission
Linux/Unix/Mac OS X shell scripts
- sendsms.sh
Example:
./sendsms.sh Account Password DestNumber "Hello World" MyOrigin
- senddemo.sh
Example:
./senddemo.sh Account Password DestNumber "Hello World" MyOrigin
Windows shell scripts
- sendsms.bat
Example:
sendsms.bat Account Password DestNumber "Hello World" MyOrigin
- senddemo.bat
Example:
senddemo.bat Account Password DestNumber "Hello World" MyOrigin
|