Pricing plans  Services  API  Partners  About the service  Contacts 
8 (800) 700 7672
Free in Russia
 

Integration with the service (API)

The API allows you to send messages through your projects and services over HTTP/HTTPS, SMTP and SMPP protocols. Ready-made libraries in different programming languages connect to your project and help you send messages from anywhere with a single command. For simplified authorization, instead of a login and password pair, you can use a special API key.


HTTP/HTTPS SMTP SMPP SOAP OMS SMS Commands Libraries and code examples

MESSAGES SENDING

MANAGING MAILING LISTS

MESSAGE STATUSES

CHECKING THE BALANCE STATUS

MANAGING CONTACTS

CLIENT MANAGEMENT

MANAGING SENDER NAMES (SENDER ID)

GETTING DATA

VARIOUS

Getting the history of sent messages

To get a list of sent SMS messages, you need to call the address using the GET or POST method: https://smscentre.com/sys/get.php?get_messages=1&login=<login>&psw=<password>
Description of the parameters passed to the Server:

OptionThe value
loginCustomer Login.
pswClient Password (you can add or change it on this page).
apikeyA special API key used for simplified authorization instead of the "login+password" pair (you can create it on this page).
startThe start date in the period for which the history is requested. Format: 'dd. mm. yyyy'. The maximum period for which it is possible to request the history of sent messages is six months.
endThe end date in the period. If omitted, data from the start date is returned. Format: 'dd.mm.yyyy'.
phoneA number or a comma-separated list of phone numbers for which you need to get the history of sent SMS messages.
emailAn e-mail address or a comma-separated list of addresses for which you need to get a history of sent e-mail messages.
formatFlag for requesting e-mail messages.
0 (default) - request SMS messages.
8 – request for e-mail messages.
cntThe number of messages returned in the response. The maximum value is 1000.
prev_idThe global message ID (the int_id parameter in the Server response) that is assigned by the Server automatically. Used to request a list of messages sent before the message with the specified ID.
fmtServer Response Format.
0 – (by default) as a string (more details can be found in the description below).
1 – return the response in the form of parameters separated by commas.
2 – response in xml format.
3 – response in json format.

If an error occurs, the Server returns the following string:
  • ERROR = N (description)

  • When fmt = 1:
    0,-N

  • When fmt = 2:
    <result>
    <error>description</error>
    <error_code>N</error_code>
    </result>

  • When fmt = 3:
    {
    "error": "description",
    "error_code": N
    }
N – error number, can take the following values:

The valueDescription
1Error in parameters.
2Invalid username or password. Also occurs when trying to send a message from an IP address that is not included in the list of allowed by the Client (if such a list was previously configured by the Client).
3Message not found.
4The IP address is temporarily blocked.
9Attempt to send more than three identical requests to get the history of outgoing messages within a minute or more than thirty requests within an hour.
This error also occurs when you try to send fifteen or more requests simultaneously from different connections under the same username (too many concurrent requests).

If the request is successful, the Server returns a response in the form of a string:
  • when fmt = 0:
    Status = <status>, check_time = <last_date>, err = <err>, send_date = <send_date>, phone = <phone>, mccmnc = <mccmnc>, country = <country>, operator = <operator>, region = <region>, cost = <cost>, sender_id = <sender>, status_name = <status_name>, message = <message>, type = <type>, ID = <id>, int_id = <int_id>, sms_cnt = <sms_cnt>, format = <format>, crc = <crc>
    ...

  • when fmt = 1:
    <status>,<last_timestamp>,<err>,<send_timestamp>,<phone>,<mccmnc>,<country>,<operator>,<region>,<cost>,<sender>,<status_name>, <message>,<type>,<id>,<int_id>,<sms_cnt>,<format>,<crc>
    ...

  • when fmt = 2:
    <list>
    <sms>
    <status>status</status>
    <last_date>last_date</last_date>
    <last_timestamp>last_timestamp</last_timestamp>
    <err>err</err>
    <send_date>send_date</send_date>
    <send_timestamp>send_timestamp</send_timestamp>
    <phone>phone</phone>
    <cost>cost</cost>
    <sender_id>sender</sender_id>
    <status_name>status_name</status_name>
    <message>message</message>
    <mccmnc>mccmnc</mccmnc>
    <country>country</country>
    <operator>operator</operator>
    <region>region</region>
    <type>type</type>
    <id>id</id>
    <int_id>int_id</int_id>
    <sms_cnt>sms_cnt</sms_cnt>
    <format>format</format>
    <crc>crc</crc>
    </sms>
    ...
    </list>

  • when fmt = 3:
    [{
    "status": <status>,
    "last_date": "<last_date>",
    "last_timestamp": <last_timestamp>,
    "err": <err>,
    "send_date": "<send_date>",
    "send_timestamp": <send_timestamp>,
    "phone": "<phone>",
    "cost": "<cost>",
    "sender_id": "<sender>",
    "status_name": "<status_name>",
    "message": "<message>",
    "mccmnc": "<mccmnc>",
    "country": "<country>",
    "operator": "<operator>",
    "region": "<region>",
    "type": <type>,
    "id": <id>,
    "int_id": "<int_id>",
    "sms_cnt": <sms_cnt>,
    "format": <format>,
    "crc": <crc>
    ...]

Where:
<status> – status Code (list)
<last_date> – the date of the last status change. Format DD.MM.YYYY hh: mm: ss.
<last_timestamp> – time stamp of the last status change.
<err> – error code if the message was not delivered.
<send_date> – date the message was sent (format DD.MM.YYYY hh: mm: ss).
<send_timestamp> – time stamp for sending the message.
<phone> – subscriber's phone number.
<country> – name of the country of registration of the subscriber number.
<operator> – the name of the operator of the subscriber.
<region> – region of registration of the subscriber number.
<type> – message type.
<cost> – message cost.
<sender> – sender ID.
<status_name> – status name.
<message> – the text of the message.
<mccmnc> – mobile country code and mobile operator code.
<id> – message ID.
<int_id> – global Message ID.
<sms_cnt> – number of parts per message.
<format> – message format.
<crc> – message checksum.

Examples:

Receiving the last ten outgoing SMS messages:

https://smscentre.com/sys/get.php?get_messages=1&login=alex&psw=123&cnt=10
Receiving the last outgoing SMS message sent to the number " 79999999999":

https://smscentre.com/sys/get.php?get_messages=1&login=alex&psw=123&phone=79999999999

The server does not accept more than three identical requests within a minute or thirty requests within an hour to get the history of outgoing messages to reduce the load and protect against errors and loops in the Client-side program.




© 2003–2024 SMS Center LLC
support@smscentre.com
Contacts
Design — Artemy Lebedev Studio
Site Information
SMS Center for Android Yandex. Metrica