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 the 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.


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

SENDING MESSAGES

MANAGING MAILING LISTS

MESSAGE STATUSES

CHECKING THE BALANCE STATUS

CONTACT MANAGEMENT

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).
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'.
phoneThe number or comma-separated list of phone numbers for which you need to get the history of sent SMS messages.
emailE-mail address or a comma-separated list of addresses for which you need to get the 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 as 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Ц2023 SMS Center LLC
License no. 166255
support@smscentre.com
Contacts
Design Ч Artemy Lebedev Studio
Site Information
SMS Center for Android Yandex. Metrica