Developer's REST SMS API v.2 - communicating with the SMS Gateway

This document provides a reference for all features available to you via the HTTP interface for sending SMS.
The HTTP API allows you to integrate your Application (Client) to SMSCenter.gr (Gateway) using the HTTP protocol to send SMS.

General info

The Client issues a HTTP GET request to the SMSCenter.gr HTTP interface supplying a list of required parameters. SMSCenter.gr issues back a HTTP Response which indicates the success of the transaction.

Note that the delimiter used for status call in returned data, '|', is the pipe character (ASCII 124).

All parameters passed must be URL-encoded and also in UTF-8, as described in the following code samples.

API responses format

The API responds to all calls according to the parameter type. Accepted values for parameter type are: v2 which is the default value, json and xml.
Example of responses for API call key/get:

...&type=v2

Responds:

6fe2dd9c06df83

...&type=json

Responds:

{
   "status" : "1",
   "key" : "6fe2dd9c06df83",
   "remarks" : "Success"
}

...&type=xml

Responds:

<response>
   <status>1</status>
   <key>6fe2dd9c06ff83</key>
   <remarks>Success</remarks>
</response>

Try it out   (key/get)

https://static.smscenter.gr/api/key/get?username=&password=&type=
Try it out  

The commands available in this version of the SMSCenter.gr API follows below.




API Key

The API Key should be used instead of username and password for all API calls. You can still use the username and password parameters, but we strongly recommend using the API Key instead for security reasons.

You acquire your API Key using the key/get call and you use it for all API calls instead of username and password parameters. If you need to change the API Key, you can do so using the key/reset call.
The key/get and key/reset calls are the only ones that require the use of username and password.
Once you get your API Key you can use it for all other API calls.

Try it out   (key/get)

https://static.smscenter.gr/api/key/get?username=&password=&type=
Try it out  

Try it out   (key/reset)

https://static.smscenter.gr/api/key/reset?username=&password=&type=
Try it out  

Return

...&type=v2

Responds:

6fe2dd9c06df83

...&type=json

Responds:

{
   "status" : "1",
   "key" : "6fe2dd9c06df83",
   "remarks" : "Success"
}

...&type=xml

Responds:

<response>
   <status>1</status>
   <key>6fe2dd9c06ff83</key>
   <remarks>Success</remarks>
</response>
 

Sending SMS

RESTful SMS API v.2

URL: https://static.smscenter.gr/api/sms/send?key=[API Key]

Accepted Parameters

Parameter Description Presence
text Message to be sent. Must be URL encoded Mandatory
to MSIDSN of the recipient that the message will be sent to. Eg: 49175123456 Mandatory
from Sender ID (if alphanumeric, max 11 characters, numeric max 16 digits) Optional
flash Set true to send Flash SMS Optional
ucs Set true to send the sms using UCS encoding Optional
timestamp Set the timestamp to send the sms in Unix Epoch timestamp Optional
type Type of API response, can be one of v2, json or xml Optional

Returns

...&type=v2

Responds:

1234567890

...&type=json

Responds:

{
   "status" : "1",
   "id" : "1234567890",
   "balance" : "1234",
   "remarks" : "Success"
}

...&type=xml

Responds:

<response>
   <status>1</status>
   <id>1234567890</id>
   <balance>1234</balance>
   <remarks>Success</remarks>
</response>
Description
status 1 for message sent, otherwise message send failed
id the message id number (or 0 if failed). Delivery reports are given on message ids
balance the balance of the account
remarks Remarks about the call

Try it out   (sms/send)

https://static.smscenter.gr/api/sms/send?key=&to=&from=&text=Hello&type=
Try it out  

Code Examples for sending SMS