Skip to content

HTTP GET

Mobile terminated messages

Send an SMS

A complete URL for sending “Hello World” to the subscriber with number +46701234567 is given below. Pasting this URL into a web browser and pressing Enter creates the correct GET request and sends it to the specified host and port.

1
https://get.spiricom.spirius.com:55001/cgi-bin/sendsms?User=myuser&Pass=mypassword&To=+46701234567&From=+46701234567&Msg=Hello+world

If everything is correct, the web browser will display a message similar to the one given below.

1
Accepted for delivery, eda0ae82-98d7-40b3-bbaa-205b68b63c0b

Send a Flash SMS

The message is a flash SMS containg the message “Hello World”.

1
https://get.spiricom.spirius.com:55001/cgi-bin/sendsms?User=myuser&Pass=mypassword&To=+46701234567&From=+46701234567&Msg=Hello+world&MsgType=1

Send an SMS with alphanumeric sender

The message is sent from sender alphanumeric address Test. A maximum of 11 characters and A-Z, a-z, 0-9.

1
https://get.spiricom.spirius.com:55001/cgi-bin/sendsms?User=myuser&Pass=mypassword&To=+46701234567&From=Test&FromType=A&Msg=Hello+world

Send an SMS with ÅÄÖ using ISO-8859-1

The message contains åäöÅÄÖ with default ISO-8859-1 encoding.

1
https://get.spiricom.spirius.com:55001/cgi-bin/sendsms?User=myuser&Pass=mypassword&To=+46701234567&From=+46701234567&Msg=%E5%E4%F6%C5%C4%D6

Send an SMS with ÅÄÖ using UTF-8

The message contains ”åäöÅÄÖ” with UTF-8 encoding.

1
https://get.spiricom.spirius.com:55001/cgi-bin/sendsms?User=myuser&Pass=mypassword&To=+46701234567&From=+46701234567&Msg=%C3%A5%C3%A4%C3%B6%C3%85%C3%84%C3%96​&CharSet=UTF8

Send an SMS using UTF-16

The message contains ABBA and is sent with UTF-16 encoding.

1
https://get.spiricom.spirius.com:55001/cgi-bin/sendsms?User=myuser&Pass=mypassword&To=+46701234567&From=+46701234567&Msg=%fe%ff%00%41%00%42%00%42%00%41&CharSet=UTF16

Send a Unicode UCS-2 SMS

The message contains “ABBA”. The Coding parameter determines how the message will be encoded when delivered to the handset.

1
https://get.spiricom.spirius.com:55001/cgi-bin/sendsms?User=myuser&Pass=mypassword&To=+46701234567&From=+46701234567&Msg=ABBA&Coding=2

Send an SMS with emoji

This is the same as a Unicode UCS-2 SMS and contains the emoji 😃.

1
https://get.spiricom.spirius.com:55001/cgi-bin/sendsms?User=myuser&Pass=mypassword&To=+46123456789&From=+46123456789&CharSet=UTF8&Coding=2&Msg=%F0%9F%98%83

Send a binary SMS

The binary message contains "Hello world". The Coding parameter determine how the message will be encoded when delivered to the handset.

1
https://get.spiricom.spirius.com:55001/cgi-bin/sendsms?User=myuser&Pass= mypassword&To=+46701234567&From=+46701234567&MsgType=3&Msg=48656c6c6f20776f726c64&Coding=1

Mobile originated messages

Push

The message below is an example of a GET request sent from Spirius SMS Gateway, containing a MO-message. Note that the entire URL can be specified by the client (except for the parameters containing information regarding the message). Messages will be resent until acknowledged with HTTP status code 200 OK.

The message contains ”Hello world”.

1
2
3
4
5
GET /sms?From=Test&FromType=A&To=%2B46712345678&ToType=I&Msg=Hello%20world&MsgType=0 HTTP/1.1
Connection: keep-alive
User-Agent: SPIRIcom/1.0
X-Timestamp: 2018-10-03 12:39:14
X-Transaction-Id: eda0ae82-98d7-40b3-bbaa-205b68b63c0b

Pull

getnextmessage

Request

Example of getnextmessage:

1
https://get.spiricom.spirius.com:55001/cgi-bin/getnextmessage?User=myuser&Pass=mypassword
Response

The message below is an example of a valid response to getnextmessage.

1
2
3
4
5
6
7
8
9
HTTP/1.1 200 OK
Server: SPIRIcom/1.0
Date: Tue, 02 Oct 2018 14:27:35 GMT
Content-Length: 164
Content-type: text/html
Pragma: no-cache
Cache-Control: no-cache

{"Result": 1, "From": "+46733317002", "FromType": "I", "To": "+46731297001", "ToType": "I", "Msg": "Hello world ", "MsgType": 0, "Timestamp": "2018-10-02 14:27:31"}

getmessagelist

Request

Example of getmessagelist:

1
https://get.spiricom.spirius.com:55001/cgi-bin/getmessagelist?User=myuser&Pass=mypassword
Response

The message below is an example of a valid response to getmessagelist.

1
2
3
4
5
6
7
8
9
HTTP/1.1 200 OK
Server: SPIRIcom/1.0
Date: Tue, 02 Oct 2018 14:46:43 GMT
Content-Length: 86
Content-type: text/html
Pragma: no-cache
Cache-Control: no-cache

{"Result": 1, "Messages": [{"TransactionId": "dca03424-25d5-4652-8b16-ac078978241e"}]}

getmessageforid

Request

Example of getmessageforid:

1
https://get.spiricom.spirius.com:55001/cgi-bin/getmessageforid?TransactionId=dca03424-25d5-4652-8b16-ac078978241e&User=myuser&Pass=mypassword
Response

The message below is an example of a valid response to getmessageforid.

1
2
3
4
5
6
7
8
9
HTTP/1.1 200 OK
Server: SPIRIcom/1.0
Date: Tue, 02 Oct 2018 14:49:34 GMT
Content-Length: 164
Content-type: text/html
Pragma: no-cache
Cache-Control: no-cache

{"Result": 1, "From": "+46123456789", "FromType": "I", "To": "+46731297001", "ToType": "I", "Msg": "Hello world ", "MsgType": 0, "Timestamp": "2018-10-02 14:46:39"}

Delivery reports

Push

The message below is an example of a GET request sent from Spirius SMS Gateway, containing the report for transaction ID bc757d8a-a0db-4e0d-a388-bf6d6eee0d87.

1
2
3
4
5
6
GET /dlr HTTP/1.1
Connection: keep-alive
User-Agent: SPIRIcom/1.0
X-Transaction-Id: bc757d8a-a0db-4e0d-a388-bf6d6eee0d87
X-Timestamp: 2018-10-03 13:26:00
X-Result: Delivered

The message below is an example of a valid response to a delivery report. Delivery reports will be resent until acknowledged with HTTP status code 200 OK.

1
2
HTTP/1.1 200 OK
Connection: close

Pull

The message below is an example of a GET-request sent to SMS Gateway, to request the status of transaction ID bc757d8a-a0db-4e0d-a388-bf6d6eee0d87.

1
https://get.spiricom.spirius.com:55001/cgi-bin/getmessagestatus?User=myuser&Pass=mypassword&TransactionId=bc757d8a-a0db-4e0d-a388-bf6d6eee0d87

The message below is an example of a valid response.

1
2
3
4
5
6
7
8
HTTP/1.1 200 OK
Server: SPIRIcom/1.0
Date: Thu, 09 Sep 2010 13:10:20 GMT
Content-Length: 31
Content-type: text/html
Pragma: no-cache
Cache-Control: no-cache
{"Result": 1, "StatusCode": 1}