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

MESSAGES SENDING

MANAGING MAILING LISTS

MESSAGE STATUSES

CHECKING THE BALANCE STATUS

MANAGING CONTACTS

CLIENT MANAGEMENT

MANAGING SENDER NAMES (SENDER ID)

GETTING DATA

VARIOUS

Receiving incoming messages

To get a list of incoming messages, call the address using the GET or POST method: https://smscentre.com/sys/get.php?get_answers=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).
cntThe number of messages returned in the response. The maximum value is 10000.
hourThe period in hours for which to request incoming messages. Maximum number of hours - 168 (7 days).
after_idID of the message from which to return incoming messages, with the exception of the message itself. after_id.
to_phoneThe Client's phone number to which incoming messages were received.

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).
4The IP address is temporarily blocked.
9Attempt to send more than three identical requests to receive a list of incoming messages within a minute.
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:
    id = <id>, received = <received>, phone = <phone>, message = <message>, to_phone = <to_phone>, sent = <sent>
    ...

  • when fmt = 1:
    <id>,<received>,<phone>,<to_phone>,<sent>,<message>
    ...

  • when fmt = 2:
    <sms_answers>
    <sms>
    <id>id</id>
    <received>received</received>
    <phone>phone</phone>
    <message>message</message>
    <to_phone>to_phone</to_phone>
    <sent>sent</sent>
    </sms>
    ...
    </sms_answers>

  • when fmt = 3:
    [{
    "id": <id>,
    "received": "<received>",
    "phone": "<phone>",
    "message": "<message>",
    "to_phone": "<to_phone>",
    "sent": "<sent>"
    },
    ...]

Where:
<id> – the ID of the incoming message that is assigned by the Server automatically.
<received> – the date the message was received by the Server. Format DD.MM.YYYY hh:mm:ss.
<phone> – subscriber's phone number.
<message> – incoming message.
<to_phone> – recipient's phone number.
<sent> – the date the message was sent. Format DD.MM.YYYY hh: mm: ss.


Examples:

Getting a list of 10 first incoming messages for the current day:

https://smscentre.com/sys/get.php?get_answers=1&login=alex&psw=123&cnt=10
Getting a list of 15 first incoming messages in the last 48 hours:

https://smscentre.com/sys/get.php?get_answers=1&login=alex&psw=123&hour=48&cnt=15
Getting a list from 20 of the first incoming messages with IDs larger than id="1234567":

https://smscentre.com/sys/get.php?get_answers=1&login=alex&psw=123&after_id=1234567&cnt=20

The server does not accept more than three identical requests within a minute to receive a list of incoming 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