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

HTTP/HTTPS protocol

Backup server address: www2.smscentre.com.

Messages sending

Sending an SMS message

To send an SMS, you need to call the GET or POST address method: https://smscentre.com/sys/send.php?login=<login>&psw=<password>&phones=<phones>&mes=<message>
To get the SMS cost, you need to call the GET or POST address method: https://smscentre.com/sys/send.php?login=<login>&psw=<password>&phones=<phones>&mes=<message>&cost=1
To send an SMS with the transmission of parameters in json format in the request body, you must use the POST method to call the address: https://smscentre.com/rest/send/
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).
phonesThe number or comma-separated or semicolon-separated list of mobile phone numbers in international format to which the message is sent. Numbers can be passed without the "+ " sign. If the number is passed without the " + " sign, it can be corrected by automatic formatting and converted to the correct international format. Thus, some errors when entering phone numbers can be corrected automatically. To disable auto-correction, pass the number with the "+ " sign.".
You can also send a message to a group of numbersby specifying a special code " G<íîìåð ãðóïïû>". The message will be sent to all numbers belonging to this group. For an e-mail message, a list of recipients' e-mail addresses is transmitted. For telegram, it is possible to specify the subscriber's nickname or ID as the recipient of the message in the form of #ID.
mesThe text of the message being sent. The maximum size is 1000 characters. If necessary, the message will be divided into several SMS messages sent to the subscriber and paid separately. Size of one SMS – 160 characters in Latin or 70 characters in Cyrillic. When splitting a message into multiple SMS messages, a header is added to each part to combine the parts into a single message on the recipient's phone, and the maximum length becomes 67 for Cyrillic and 153 for Latin letters. You can add comments to the message text that are intended for the sender to view the history in the personal account.
Additional options
idThe message ID. Assigned by the Client. Serves for further identification of the message. If not specified, it will be assigned automatically. Not necessarily unique. The identifier is a 32-bit number in the range from 1 to 2147483647, or a string up to 40 characters long consisting of Latin letters, numbers, and symbols ."-_".
senderThe sender's name displayed on the recipient's phone. English letters, numbers, spaces, and some characters are allowed. Length – 11 characters or 15 digits. All names are registered in your personal account on this page.
translitA sign that the message you want to translate in translit.
0 (default) – do not translate into transliteration.
1 – translate to translit as " translate".
2 – translate into transliteration as " mpaHc/Ium".
tinyurlAutomatically shorten links in messages. Allows you to replace links in the message text with short ones to reduce the length, as well as to track the number of clicks on this page.
0 (default) – leave links in the message text without changes.
1 – shorten links.
timeThe time of sending the SMS message to the subscriber.
Formats:
  1. DDMMYYhhmm or DD.MM.YY hh: mm.
  2. h1-h2. Sets the time range in hours. If the current time is less than h1, the SMS message will be sent to the subscriber when the time h1 occurs, if the current time falls in the interval from h1 to h2, that message will be sent immediately, otherwise the message will be sent the next day when the h1 time is reached. This function, for example, is useful in order to prevent subscribers from receiving SMS messages at night.
  3. 0ts, where ts is timestamp, the time in seconds since January 1, 1970.
  4. +m. Sets the relative time offset from the current time in minutes. The + character must be encoded as %2B in the http request.
If time = 0 or the time already elapsed is specified, the message will be sent immediately.
tzThe time zone in which the time parameter is set. It is indicated relative to Moscow time. The tz parameter can be either positive or negative. If tz is equal to 0, the Moscow time zone will be used , if the tz parameter is not set, the time zone will be taken from the Client settings.
periodThe period of time during which you need to send the newsletter. Represents a number in the range from 0.1 to 720 hours. Used in conjunction with the freq parameter. This parameter allows you to stretch the mailing list in time for the gradual receipt of SMS messages by subscribers.
freqThe interval or frequency at which to send an SMS message to the next group of numbers. The number of numbers in the group is calculated automatically based on the period and freq parameters. Set in the interval from 1 to 1440 minutes. Without the period parameter, the freq parameter is ignored.
flashIndicates whether a Flash message is displayed immediately on the phone screen.
0 (default) – normal message.
1 – Flash message.
binBinary message flag.
0 (default) – normal message.
1 – binary message. In an http request, it must be encoded using the urlencode function.
2 – binary message, represented as a hexadecimal string (hex).

The binary message is passed along with the UDH header at the beginning in the mes parameter, in which the first byte specifies the length of the header. To send a binary message without a UDH header, specify a null byte at the beginning of the message (00 in hex).
To be able to pass the pid and dcs parameters, you need to add a special combination "\n~~~\n" (line feed, 3 tilde characters, and again line feed) to the end of the binary message, and then the text "pid: value1, dcs: value2" with the exact preservation of spaces.
pushA sign of a wap-push message, with which you can send an Internet link to your phone.
0 (default) – normal message.
1 – wap-push message. In the mes parameter, you must pass the link and title through a line feed.
hlrA sign of the HLR-request for information about the number from the operator's database without sending real SMS.
0 (default) – normal message.
1 – HLR request. An HLR request will be executed for each phone number in the list. The mes parameter is not used.
pingIndicates a special SMS that is not displayed in the phone to check the numbers for availability in real time by the delivery status.
0 (default) – normal message.
1 – ping-sms. A Ping SMS will be sent to each phone number in the list. The mes parameter is not used.
mmsA feature of an MMS message that can be used to transmit text (txt), images in various formats (jpg, gif, png), music (wav, amr, mp3, mid), and video (mp4, 3gp). The files are passed in the body of the http request.
0 (default) – normal message.
1 – An MMS message. An MMS will be sent to each phone number in the list.
mailThe flag of the e-mail message. The files attached to the message are passed by the POST method in the body of the http request..
0 (default) – normal message.
1 – e-mail message.
socA sign of a soc message sent to users of the social networks "Odnoklassniki", "VKontakte" or to users of " Mail.Ru Agent".
0 (default) – normal message.
1 – soc message.
viberFlag of the viber message sent to users of the Viber messenger.
0 (default) – normal message.
1 – viber message.
whatsappA sign of a whatsapp message sent to WhatsApp messenger users.
0 (default) – normal message.
1 – whatsapp message.
tgIf the value of this parameter is set to 1, a telegram message will be sent with the confirmation code passed in the mes parameter.
botBot's name to for sending a message in the format "@botname_bot".
smsreqWhen this parameter is specified, the system will not display the text of the message sent to the user and display a warning about the need to confirm the phone number if more than smsreq days have passed since the last confirmation. Range of values from 10 to 999.
fileurlThe full http address of the file to upload and transmit in the message. The minimum file size is 101 bytes.
callIndicates a voice message. When forming a voice message, you can send both text and attach files. Files added to the message must be passed by the POST method in the body of the http request..
0 (default) – normal message.
1 – voice message.
voiceThe voice used for voicing the text (only for voice messages).
m – male voice.
m2 – male voice 2.
m3 (default) – male voice 3.
m4 – male voice 4.
w – a woman's voice.
w2 – female voice 2.
w3 – female voice 3.
w4 – female voice 4.
When sending messages, it is also possible to specify the language of the text in the form: "m,en", "w,fr", "w,de", etc..
paramComma-separated list of parameters for a voice message in the format " param=w, i,n".
Here:
  • w – the waiting time for the caller to pick up the phone after the call starts, in seconds. If the subscriber does not pick up the phone within the specified time, the call will be repeated with the error "the subscriber is busy". The operating range of the parameter values is from 10 to 35, but you can specify an interval from 0 to 99 (if the value is less than 10, it will be reduced to 10, similarly for the upper bound).
  • i – repeat interval, that is, the time interval after which the call will be repeated (in seconds). The operating range of the parameter is from 10 to 3600 (if the value is less than 10, it will be reduced to 10).
  • n – the total number of dial-up attempts. Operating range of values from 1 to 9 (0 will be reduced to 1).
When specifying the value of any parameter other than the possible ones, the default values of all parameters will be used (n = 8, w = 25, i from 3 to 14 seconds incrementally), except for advertising messages.
subjThe subject of the MMS or e-mail message. When sending an e-mail, you must specify the subject, text, and address of the sender. For MMS , it is mandatory to specify the subject or text. If you do not specify the subject of the MMS, then the sender's name, passed in the request or used by default, will be used as it.
charsetThe encoding of the transmitted message, if used other than the default encoding of windows-1251. Options: utf-8 and koi8-r.
costIndicates whether you need to receive the cost of the mailing list.
0 (default) – normal sending.
1 – get the cost of mailing without real sending.
2 – normal sending, but add the cost of the completed mailing to the response.
3 – normal sending, but add the cost and the new Customer balance to the response.
fmtFormat of the server response about successful sending.
0 – (by default) as a string (OK - 1 SMS, ID - 1234).
1 – return the response in the form of numbers: ID and number of SMS separated by commas (1234,1), with cost = 2, another comma-separated cost (1234,1,1.40), with cost = 3, another new Customer balance (1234,1,1.40,100.50), with cost = 1, the cost and quantity Comma separated SMS (1.40,1).
2 – response in xml format.
3 – response in json format.
listA list of phone numbers and their corresponding messages, separated by a colon or semicolon, and presented as:
phones1:mes1
phones2:mes2
...
Lines are separated by a newline character (%0A). As phones, you can specify multiple phone numbers separated by commas. If you want to pass a newline character in the mes message, specify it with \n. If it is not possible to correct the text of a multi-line message, it is possible to enable a special mode for transmitting this type of message. To do this, you must additionally pass the nl parameterequal to 1 in the request.
If it is necessary to transmit different names of senders (and possibly different time zones of subscribers (works only for requests in which the time parameter is represented as DDMMYYhhmm or DD.MM.YY hh:mm)) The following transmission format can be used for different messages:
sender1,tz1|phones1:mes1
sender2,tz2|phones2:mes2
...
In this case, the tz parameter is optional.
The list parameter allows you to send multiple messages with different messages to multiple phones. an http request. The messages in the request are assigned a single identifier. The entire parameter must be encoded using the urlencode function.
validThe "life" period of the SMS message. Specifies the time during which the operator will attempt to deliver the message to the subscriber. Range from 1 to 24 hours. It is also possible to transmit the time in the hh:mm format in the range from 00:01 to 24:00.
maxsmsThe maximum number of SMS messages that a long message can be split into. Messages that are too long will be truncated so as not to overwhelm the number of SMS messages required to transmit them. With this parameter, you can limit the maximum cost of messages, since a separate fee is charged for each SMS.
imgcodeThe value of the alphanumeric code entered with "captcha" when using anti-spam verification. This parameter must be used in conjunction with the userip parameter.
useripThe value of the IP address to which to apply the limit on the maximum number of messages per IP address per day established in settings personal account in the "Limits and restrictions".
errIndicates whether to add a list of invalid numbers to the server response.
0 (default) – do not add a list (normal server response).
1 – a list of erroneous phone numbers with the corresponding statuses is added to the response.
opIndicates whether to add information for each number to the server response.
0 (default) – do not add a list (normal server response).
1 – the response adds a list of all phone numbers with their respective statuses, mcc and mnc values, cost, and, in the case of erroneous numbers, error codes..
ppBinds the Client as a referral to a specific partner ID for the current request.
Ïðè ïåðåäà÷å äàííîãî ïàðàìåòðà in the form of "pp=<ID ïàðòíåðà>" Êëèåíò ñ ëîãèíîì login âðåìåííî ñòàíîâèòñÿ ðåôåðàëîì ïàðòíåðà ñ ID <ID ïàðòíåðà>. Deductions for the partner program will be made for the current request, there is no permanent binding. This option allows you to temporarily install a Client as a referral from your services and programs, where it is not possible to register a Client using a referral link.


Required parameters are login, psw, phones, and mes, or login, psw and list.

After receiving and processing the data, the Server returns a confirmation to the Client indicating the result of processing.

All parameters that contain special characters (plus, space, etc.) must be encoded using the urlencode function to be passed in an HTTP request..

Sending messages. Server response and error codes

The server sends the response as a string:

If an error occurred, the response will be one of the following:

When fmt = 0:
  • ERROR = N (description) – for 1,2,4,5,9 errors;

  • ERROR = N (description), ID - <id ñîîáùåíèÿ> – for 3 errors,6,7,8.
When fmt = 1:
  • 0,-N – for errors 1,2,4,5,9;
  • <id ñîîáùåíèÿ>,-N – for 3 errors,6,7,8.
When fmt = 2:
  • For 1 errors,2,4,5,9:

    <result>
    <error>description</error>
    <error_code>N</error_code>
    </result>

  • For 3 errors,6,7,8:
    <result>
    <error>description</error>
    <error_code>N</error_code>
    <id>id ñîîáùåíèÿ</id>
    </result>
When fmt = 3:
  • For 1 errors,2,4,5,9:
    {
    "error": "description",
    "error_code": N
    }

  • For 3 errors,6,7,8:
    {
    "error": "description",
    "error_code": N,
    "id": <id ñîîáùåíèÿ>
    }
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).
3Insufficient funds on the Client's account.
4IP address is temporarily blocked due to frequent errors in the queries. read More
5Invalid date format.
6The message is forbidden (by text or by the sender's name). This error also occurs when you try to send mass and / or advertising messages without a signed contract.
7Invalid phone number format.
8The message to the specified number can not be delivered.
9Sending more than one identical SMS message request or more than five identical requests to receive the cost of a message 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 processed successfully, a string of the following format is returned:
  • when cost = 0 and fmt = 0: OK - <n> SMS, ID - <id>

  • when cost = 1 and fmt = 0: <cost> (<n> SMS)

  • when cost = 2 and fmt = 0: OK - <n> SMS, ID - <id>, COST - <cost>

  • when cost = 3 and fmt = 0: OK - <n> SMS, ID - <id>, COST - <cost>, BALANCE - <balance>

  • when cost = 0 and fmt = 1: <id>,<n>

  • when cost = 1 and fmt = 1: <cost>,<n>

  • when cost = 2 and fmt = 1: <id>,<n>,<cost>

  • when cost = 3 and fmt = 1: <id>,<n>,<cost>,<balance>

  • when cost = 0 and fmt = 2:
    <result>
    <id>id</id>
    <cnt>n</cnt>
    </result>

  • when cost = 1 and fmt = 2:
    <result>
    <cost>cost</cost>
    <cnt>n</cnt>
    </result>

  • when cost = 2 and fmt = 2:
    <result>
    <id>id</id>
    <cnt>n</cnt>
    <cost>cost</cost>
    </result>

  • when cost = 3 and fmt = 2:
    <result>
    <id>id</id>
    <cnt>n</cnt>
    <cost>cost</cost>
    <balance>balance</balance>
    </result>

  • when cost = 0 and fmt = 3:
    {
    "id": <id>,
    "cnt": <n>
    }

  • when cost = 1 and fmt = 3:
    {
    "cost": "<cost>",
    "cnt": <n>
    }

  • when cost = 2 and fmt = 3:
    {
    "id": <id>,
    "cnt": <n>,
    "cost": "<cost>"
    }

  • when cost = 3 and fmt = 3:
    {
    "id": <id>,
    "cnt": <n>,
    "cost": "<cost>",
    "balance": "<balance>"
    }

  • when op = 1 and fmt = 0 or 1, the information is added to the end of the normal output from a new line:
    <phone>,<mccmnc>,<cost>,<status>,<error>

  • when op = 1 and fmt = 2, an array is added to the response:
    <phones>
    <phone mccmnc="mccmnc" cost="cost" status="status" error="error">phone</phone>
    ...
    </phones>

  • when op = 1 and fmt = 3, an array is added to the response:
    "phones": [{
    "phone": "<phone>",
    "mccmnc": "<mccmnc>",
    "cost": "<cost>",
    "status": "<status>",
    "error": "<error>"
    },
    ...
    ]

Where:
<n><n> is the number of SMS sent, calculated as the number of SMS messages in the message multiplied by the number of recipients.
<id> – the message ID sent by the Client or assigned automatically by the Server.
<cnt> – the number of parts (when sending an SMS message) or the number of seconds (when sending a voice message (call)).
<balance> – new Customer Balance.
<phone> – phone number.
<mccmnc> – the numeric code of the subscriber's country plus the numeric code of the subscriber's operator.
<cost> – the cost of an SMS message.
<status> – sMS Message status code.
<error> – error code in the status.

The server does not accept more than one identical request to send SMS messages within a minute to protect against errors and loops in the Client-side program in order to reduce the load and not waste the Client's funds, as well as to prevent multiple messages from being sent to one subscriber.

The server also blocks sending more than 50 messages to one subscriber, which were sent with a break between messages of less than 60 seconds, to protect against flooding and unnecessary debiting of funds from the Client's account, since many operators do not pass a large number of messages to one subscriber in a short period of time.

Examples of sending messages

Examples:

Normal message:

https://smscentre.com/sys/send.php?login=alex&psw=123&phones=79999999999&mes=Hello! https://smscentre.com/sys/send.php?login=alex&psw=123
&list=79999999999:Hello!%0A79999999999:Hello\nworld!

Flash message encoded in "utf-8" from the sender "ivan", translated into transliteration, which must be delivered to the subscriber 01.01.2012 in 00:00:

https://smscentre.com/sys/send.php?login=alex&psw=123&phones=79999999999&mes=Hello%20world!
&translit=1&time=0101120000&flash=1&sender=ivan
&charset=utf-8

Binary EMS message with the text " Hello, World!", in which the word "World" is italicized and underlined:

https://smscentre.com/sys/send.php?login=alex&psw=123&phones=79999999999
&mes=050A0307056048656C6C6F2C20576F726C6421&bin=2

Binary WAP-push message that sends a link to the site " http://wap.ru/":

https://smscentre.com/sys/send.php?login=alex&psw=123&phones=79999999999
&mes=0605040B8423F0DC0601AE02056A0045C60C037761702E72752F0001037761702E7275000101&bin=2

WAP-push message in text form, transmitting a link to the site "http://wap.ru" with the title " WAP.RU":

https://smscentre.com/sys/send.php?login=alex&psw=123&phones=79999999999
&mes=http://wap.ru%0AWAP.RU&push=1

Comments in SMS messages

When sending SMS messages, you can add any comment to the end of the text that clarifies or supplements the SMS message for the sender. This text will not be sent to subscribers and will not affect the cost of SMS and is available for viewing and filtering in the list of sent messages in your personal account.

To add a comment, you must specify a special combination "\n~~~\n " at the end of the text of the SMS message intended for sending (line feed, 3 of the tilde character, and again line feed), and after that, any text that will be considered a comment will not be sent to the subscriber, but will be displayed in the history.

Examples:

Sending a single message:

Hello!
~~~
Comment
https://smscentre.com/sys/send.php?login=alex&psw=123&phones=79999999999%2C78888888888&mes=Hello!%0A~~~%0AComment
Sending multiple messages via the list parameter:

Hello1!
~~~
Comment1
Hello2!
~~~
Comment2
https://smscentre.com/sys/send.php?login=alex&psw=123&list=79999999999:Hello1!\n~~~\nComment1%0A78888888888:Hello2!\n~~~\nComment2

Sending to a group of numbers

 ëè÷íîì êàáèíåòå Êëèåíòà ïðè ñîçäàíèè or ðåäàêòèðîâàíèè ãðóïïû ìîæíî óêàçàòü the number of the mailing group ñîîáùåíèé. Òîãäà ïðè îòïðàâêå ñîîáùåíèÿ âìåñòî ñïèñêà òåëåôîíîâ ìîæíî áóäåò óêàçûâàòü êîðîòêèé êîä in the form of "G<íîìåð ãðóïïû>" or "g<íîìåð ãðóïïû>", and the message will be sent to all phone numbers belonging to this group.

Examples:

Sending a message to all phone numbers belonging to groups with assigned numbers 777 and 888:

https://smscentre.com/sys/send.php?login=alex&psw=123&phones=G777%2Cg888&mes=Hello!

Sending an HLR request

You can check phone numbers for availability by sending a special HLR request. As a result of executing the request, data will be received about the subscriber's country and operator, about the roaming operator when the subscriber is on someone else's network, as well as about the subscriber's status (available or not). Subscribers, owners of the numbers being checked, will not receive any notifications about the checks performed on their number.

Execution of an HLR request over the HTTP protocol is performed in the same way as sending an SMS message, and the request must pass an additional parameter hlr=1.

To send an HLR request, use the GET or POST method to call the address: https://smscentre.com/sys/send.php?login=<login>&psw=<password>&phones=<phones>&hlr=1
Other parameters that are used for sending regular SMS messages and described on this page are also available.

The result of the HLR request can be sent to the URL for receiving incoming messages and statuses specified in the settings in your personal account, or it can be read by requesting the status of the sent SMS message.

Example:
https://smscentre.com/sys/send.php?login=alex&psw=123&phones=79999999999&hlr=1

Sending an e-mail message

To send an e-mail, you need to call the GET or POST address method: https://smscentre.com/sys/send.php?login=<login>&psw=<password>&phones=<phones>&mes=<message>&sender=<sender>&subj=<subj>&mail=1
If you plan to transfer any files when sending them, then they must be transmitted by the POST method in the body of an http(s) request to the server. The positions in the text in which you plan to insert files must be designated in a special way in the form of "<file n><file n>", where n is the file number in the generated list starting from one. If you do not specify the positions, then the corresponding files will be added to the end of the message.

Ïðè ñîçäàíèè ñîîáùåíèÿ ìîæíî âñòàâëÿòü â òåêñò http(s)-ññûëêè ðàíåå çàãðóæåííûõ ôàéëîâ, óçíàòü êîòîðûå ìîæíî â ëè÷íîì êàáèíåòå íà ñòðàíèöå îòïðàâêè, íàæàâ ïîñëåäîâàòåëüíî ññûëêè "ïðèêðåïèòü ôàéë" – "Çàãðóæåííûå ôàéëû". Òàêæå ìîæíî óêàçûâàòü ëîêàëüíûå ññûëêè íà çàãðóæåííûå ôàéëû íà íàøåì ñåðâåðå in the form of "<file /upload/files/sms/êàòàëîã_çàãðóçêè/íàçâàíèå_ôàéëà>". Äëÿ âëîæåíèé-êàðòèíîê ìîæíî óñòàíàâëèâàòü àòðèáóòû, for example,, "<file /upload/files/sms/êàòàëîã_çàãðóçêè/íàçâàíèå_ôàéëà width=200 height=400>". To download a file from an external source, you can pass an additional fileurl parameter in the request containing the full http(s) address of the file.

The maximum number of attachments transmitted in a request is 20, and the size of each attachment should not exceed 10 MB. If the specified limits are exceeded, an error with the code 1 (incorrect parameters) will be returned. When sending each email, the maximum total size of attached attachments is 15 MB, attachments that do not fit into this size will be transmitted by a link to our website.

By default, a special unsubscribe link is added to the end of the message text. To disable this link, you need to add a special macro {no_unsub} to any place in the text of the letter.

For e-mail messages, specifying the subject, text and sender's address is mandatory.

Examples of sending e-mail messages

Examples:

Sending an e-mail to the address "alex@mysite.com" with the subject "Privet" and the text "Hello" from the sender "alex2@mysite2.com":

https://smscentre.com/sys/send.php?login=alex&psw=123&phones=alex%40mysite.com&mes=Hello&subj=Privet&sender=alex2%40mysite2.com&mail=1
Sending an e-mail with the subject "Holiday" and two photos via the cURL-based library:

<?php
include "smsc_api.php";
send_sms("alex@mysite.com", "Hello", 0, 0, 0, 8, "alex2@mysite2.com", "subj=Holiday", array("/home/alex/1.jpg", "/home/alex/2.jpg"));
?>

Sending an e-mail with the subject "Hello" and a photo uploaded earlier to the server:

<?php
include "smsc_api.php";
send_sms("alex@mysite.com", "Hello, this is my photo &lt;file /upload/files/sms/123abc/photo.jpg width=200 height=400>", 0, 0, 0, 8, "alex2@mysite2.com", "subj=Hello");
?>

Sending a voice message (call)

To send a voice message, you need to call the address using the GET or POST method: https://smscentre.com/sys/send.php?login=<login>&psw=<password>&phones=<phones>&mes=<message>&call=1
When forming a message, you can specify both text and add wav and mp3 media files.

If you plan to transfer files, then they must be transmitted by the POST method in the body of an http(s) request to the server. The positions in the text in which you plan to insert files must be designated in a special way in the form of "<file n><file n>", where n is the file number in the generated list starting from one. If you do not specify the positions, then the corresponding files will be added to the end of the message.

Ïðè ñîçäàíèè ñîîáùåíèÿ ìîæíî âñòàâëÿòü â òåêñò http(s)-ññûëêè ðàíåå çàãðóæåííûõ ôàéëîâ, óçíàòü êîòîðûå ìîæíî â ëè÷íîì êàáèíåòå íà ñòðàíèöå îòïðàâêè, íàæàâ ïîñëåäîâàòåëüíî ññûëêè "ïðèêðåïèòü ôàéë" – "Çàãðóæåííûå ôàéëû". Òàêæå ìîæíî óêàçûâàòü ëîêàëüíûå ññûëêè íà çàãðóæåííûå ôàéëû íà íàøåì ñåðâåðå in the form of "<file /upload/files/sms/êàòàëîã_çàãðóçêè/íàçâàíèå_ôàéëà>". To download a file from an external source, you can pass an additional fileurl parameter in the request containing the full http(s) address of the file. In this case, passing the mes parameter in the request is optional.

Since telephone lines cannot perfectly play complex media files, when forming a sent message, the transmitted files are converted to a simple format.

When sending a voice message, the initial time and cost are calculated approximately. After sending and listening to messages the subscriber, the duration and the call cost or adjusted downwards (for example, if the subscriber has not heard the message through), or if the duration of the message exceeds the calculated, the difference in seconds is indicated in comments to the message in the form of extra time, overtime, including those which displayed in detail in a separate entry. Also, overtime may occur when using the voice menu (IVR).

The maximum number of attachments transmitted in a request is four, and the size of each attachment should not exceed 5 MB. If the specified limits are exceeded, processed attachments will be excluded.

To send your phone number as the sender's name, you must specify it in the sender parameter. The specified number must first be added and activated in the personal account on this page.

When forming a request, you can pass a special parameter param, which specifies some characteristics of the call (more details can be found in the description). Additionally, you can also pass the voice parameter in the request, which determines the voice used for voicing the text. This parameter can take the following values:
  • voice = m – male voice.
  • voice = m2 – male voice 2.
  • voice = m3 – male voice 3 (by default).
  • voice = m4 – male voice 4.
  • voice = w – a woman's voice.
  • voice = w2 – female voice 2.
  • voice = w3 – female voice 3.
  • voice = w4 – female voice 4.
When sending messages, it is also possible to specify the language of the text in the form: "m,en", "w,fr", "w,de", etc..

Using the voice menu (IVR)

To use the voice menu, you must send a text or voice file with the initial instructions for the subscriber at the beginning of the message text and then specify a macro containing the service menu commands {menu: <...>}, where <...> description of the voice menu options.

Schematically, the message using the voice menu looks like this:
ÑÒÀÐÒÎÂÛÉ ÒÅÊÑÒ

{menu: [ÒÅÊÑÒ ÌÅÍÞ]
1: ÒÅÊÑÒ èëè ÊÎÌÀÍÄÀ
2
: ÒÅÊÑÒ2 èëè ÊÎÌÀÍÄÀ2
...
}

ÊÎÍÅ×ÍÛÉ ÒÅÊÑÒ

After picking up the phone, the subscriber is given the "START TEXT", then the "MENU TEXT" is played with a description of the menu items and acceptable actions. After pressing the key on the numeric keypad of the phone corresponding to the desired item, the subscriber can be voiced the text "TEXT" or perform one or more consecutive "COMMANDS". After exiting the menu, the "END TEXT" is voiced".

Description of the parameters used in the {menu} macro: <...>}:

OptionThe value
*: backReturn to the previous menu.
#: startReturn to the beginning of the menu and repeat the " MENU TEXT".
0: repeatRepeat the selected item.
n: msgThe menu item that the subscriber enters when pressing the nkey, where n is the number of the menu item, which can take values from 1 to 9, msg is a message or command. Menu items can be duplicated one by one to perform multiple actions when a single key is pressed.
nm: msgSub-item m of the menu item n, which the subscriber enters when pressing the mkey . It can take values from 1 to 9. msg-message or command. Menu items can be duplicated one by one to perform multiple actions when you press a single key. The nesting of sub-items is limited only by the size of the entire message (1000 characters).

In paragraphs and sub-paragraphs, you can use the following commands:

TeamThe value
urlThe http(s) address of the Client's handler, to which information about the current item and the time of the subscriber's stay in the menu will be transmitted.
call:phone wait=n ok:end err:n recordRedirects the caller's call to the specified phone number, where the required parameter is phone-phone number or a comma-separated list of phone numbers. You can specify up to 9 numbers. The numbers to which the subscriber's call will be redirected must be registered on this page.
Optional parameters are:
wait=n – the waiting time for the caller to pick up the phone, where n is the waiting time in seconds. The range of possible parameter values is from 0 to 120. By default, the waiting time for the subscriber to pick up the phone is 120 seconds.
ok:end – after successfully connecting to the specified number and ending the dialog, end the voice menu.
err:n – if you can't reach the specified number, then go to the step or label ndescribed in the menu body. The label can take the value of any set of Latin letters and numbers.
record – after a successful connection with the specified number, record the conversation. The recording time for one call is limited to a maximum of 30 minutes. Also, the connection and recording is interrupted after 30 seconds of silence on the part of the subscribers. This parameter is specified last. The link to the recording is displayed in the message history under the text of the voice menu.
sms:phone,sender,msgSending an SMS message to the specified phone number, where phone is the phone number, sender is the sender's name, and msg is the message text. As a phone number, as well as in the message text, a special variable $phone can be specified, which, when sent, will be replaced with the phone number of the subscriber who received this voice menu..
record: nRecording of a fragment of the subscriber's voice response, which will be performed from the moment of activation until the end of the command, where n is the time for recording in seconds. By default (without explicitly specifying the time), recording is limited to 30 seconds. Also, the recording is interrupted after 10 seconds of silence on the part of the subscriber.
endIndicates whether to exit the voice menu. After exiting, the "END TEXT" will be read".
Examples:

<?php
$url
= 'https://smscentre.com/sys/send.php?login=alex&psw=123&phones=79999999999,79999999998&call=1&charset=utf-8&mes=';

$msg = 'Çäðàâñòâóéòå!

{menu: Íàæìèòå 1 äëÿ ïåðâîãî ïóíêòà, 2 äëÿ âòîðîãî ïóíêòà, 3 äëÿ îòïðàâêè çàÿâêè íà îáðàòíûé çâîíîê, 5 äëÿ ñâÿçè ñ îïåðàòîðîì, ðåøåòêà äëÿ ïåðåõîäà â íà÷àëî, 0 äëÿ ïîâòîðà, äëÿ âîçâðàòà â ïðåäûäóùåå ìåíþ íàæìèòå çâ¸çäî÷êó.
*: back
#: start
0: repeat
1: ïóíêò 1, íàæìèòå 1 äëÿ ïîäïóíêòà 1, 2 äëÿ ïîäïóíêòà 2, 3 äëÿ ïîäïóíêòà 3
11: ïîäïóíêò 1.1
12: ïîäïóíêò 1.2
13: ïîäïóíêò 1.3
2: ïóíêò 2, íàæìèòå 1 äëÿ ïîäïóíêòà 2.1
21: ïîäïóíêò 2.1
3: sms:79999999999,Sender,òåêñò
3: end
4: sms:$phone,Sender,Âàø íîìåð: $phone
4: end
5: url
5: call:79999999999,79999999998 wait=10 ok:end err:6
6: call:79999999997 wait=60 ok:end err:callerr record
7: Ñåé÷àñ íà÷íåòñÿ çàïèñü äî 10 ñåêóíä
7: record: 10
7: Êîíåö çàïèñè
err: íåâåðíûé íîìåð, íàæìèòå 0 äëÿ ïîâòîðà
callerr: Èçâèíèòå, íå óäàëîñü äîçâîíèòüñÿ äî îïåðàòîðà, âûáåðèòå äðóãîé ïóíêò èëè ïîâòîðèòå ïîïûòêó ïîçæå}

Âñåãî âàì äîáðîãî!'
;

echo
file_get_contents($url.urlencode($msg));
?>

Examples of sending voice messages

Examples:

Sending a voice message with the text " Hello":

https://smscentre.com/sys/send.php?login=alex&psw=123&phones=79999999999&mes=Hello&call=1
Sending a voice message with the text "Hello" from the phone number "79991234567":

https://smscentre.com/sys/send.php?login=alex&psw=123&phones=79999999999&mes=Hello&call=1&sender=79991234567
Sending a voice message with the text "Hello world", voiced by a male voice, with a waiting time for picking up the handset of 20 seconds, a repeat interval of 10 seconds and the number of dial attempts equal to 3:

https://smscentre.com/sys/send.php?login=alex&psw=123&phones=79999999999&mes=Hello%20world&call=1&voice=m&param=20%2C10%2C3
Sending a voice message with the text "Hello world", voiced by a female alternative voice:

https://smscentre.com/sys/send.php?login=alex&psw=123&phones=79999999999&mes=Hello%20world&call=1&voice=w2
Sending a voice message with a voice file attached via the fileurl parameter:

https://smscentre.com/sys/send.php?login=alex&psw=123&phones=79999999999&call=1&fileurl=http://mysite.com/voice.wav
Sending a voice message with text and two audio files via a cURL-based library:

<?php
include "smsc_api.php";
send_sms("79999999999", "first file <file 1> and second file <file 2>", 0, 0, 0, 9, false, "", array("/home/alex/1.mp3", "/home/alex/2.wav"));
?>

Sending a viber message

To send a viber message, you must call the GET or POST address method: https://smscentre.com/sys/send.php?login=<login>&psw=<password>&phones=<phones>&mes=<message>&viber=1

File Transfer

Sending an image, document file, or video in a message is possible in one of the following ways:
  • in the form of ïîëíîãî http(s)-àäðåñà âíåøíåãî ôàéëà, óêàçàííîãî â òåêñòå ñîîáùåíèÿ, â ôîðìàòå <file http(s)://...> (only for images and document files);
  • by the POST method in the body of the http(s) request to the server. With this method of sending, the attached files must be designated in the message text in a special way in the form of "<file n>", where n is the file number in the generated list starting from one;
  • by adding a special additional fileurl parameter to http(s), containing the full http(s) address of the transmitted external file. When using fileurl, passing the mes parameter in the request is optional;
  • when sending from your personal account or via the API, insert the full http(s) link of the previously downloaded file into the message text, which can be found in your personal account on the sending page by clicking sequentially "attach file" – "Downloaded files".
The attached file must not exceed 1 MB in size (for API) or 10 MB (for personal account) and satisfy one of the following formats:
  • jpg, jpeg, gif, png – for pictures;
  • doc, docx, rtf, dotx, dot, odf, fodt, odt, txt, info, pdf, xps, eps, pdax, xlsx, xlsm, fods, ods, csv, xltx – for document files;
  • 3gp, m4v, mov, mp4 – for the video.

Adding a button

To insert a button in the message, when you click on it, you will open the browser and go to the specified address, you need to add a special macro {button,url,text} to the message text, where:
<button> – macro name.
<url> – full http address of the link that will be clicked when the button is clicked.
<text> – the text of the button. The length of the text can not exceed 30 characters.

To insert a button into the message, when you click on it, the subscriber will be called to the specified phone number, you need to add a special macro to the message text {button, tel:79999999999, text}.

Message types

The system supports the following types of viber messages:
  • Text only – the subscriber receives a text message.
  • Picture only – the subscriber receives the picture.
  • Text+ button – the subscriber receives a text message, under which the button is located. When you click on the button, you click on the specified link.
  • Text + button + picture – the subscriber receives a text message, under which the picture and the button are located. When you click on the button, you click on the specified link.
  • Only a file – a file of one of the supported formats is transmitted to the subscriber.
  • Picture +video – the subscriber receives a video file, the screensaver of which is the transmitted picture.
  • Text+picture+video – the subscriber receives a video file with a splash picture and the specified text.
  • Text+picture+video+button – the subscriber receives a video file with a splash picture, the specified text and a button. When you click on the button, you click on the specified link.
To configure the software and test sending viber messages, you can use our common sender name "SMSC" and predefined templates:
  • Hello! This is test message
  • Hello! This is a test message
  • Test
  • Test
  • Test {button,https://smscentre.com,site}
  • Test {button, https://smscentre.com, site}
  • Picture <file http://smscentre.com/im/smsc_logo_tiny.gif>
  • Image <file http://smscentre.com/im/smsc_logo_tiny.gif>
As in the templates for operators, the general rules for creating messages for the specified templates apply here (at the bottom of the page, the drop-down tab "Template registration rules").

Examples of sending viber messages

Examples:

Sending a viber message with the text " Hello":

https://smscentre.com/sys/send.php?login=alex&psw=123&phones=79999999999&mes=Hello&viber=1
Sending a viber message using one of the predefined templates for testing with the text "Test", the button "{button, http://smscentre.com, Site} "and the image previously uploaded in your personal account and having the address" http://smscentre.com/upload/files/sms/1856f97d/6_1.jpg":

https://smscentre.com/sys/send.php?login=alex&psw=123&phones=79999999999&viber=1&mes=Test+%7Bbutton%2Chttp%3A%2F%2Fsmscentre.com%2CSite%7D+http%3A%2F%2Fsmscentre.com%2Fupload%2Ffiles%2Fsms%2F1856f97d%2F6_1.jpg
Sending a viber message using one of the predefined templates for testing with the text "test", the button "{button, http://smscentre.com, Site} "and the image located on the external resource" https://mysite.com/sms/picture.jpg":

https://smscentre.com/sys/send.php?login=alex&psw=123&phones=79999999999&viber=1&mes=test+%7Bbutton%2Chttp%3A%2F%2Fsmscentre.com%2CSite%7D+%3Cfile+https%3A%2F%2Fmysite.com%2Fsms%2Fpicture.jpg%3E
Sending a viber message using one of the predefined test templates with the text "test", the button "{button,http://smscentre.com,Site}" and the picture "https://mysite.com/sms/picture.jpg" passed through the fileurl parameter:

https://smscentre.com/sys/send.php?login=alex&psw=123&phones=79999999999&viber=1&mes=test+%7Bbutton%2Chttp%3A%2F%2Fsmscentre.com%2CSite%7D&fileurl=https%3A%2F%2Fmysite.com%2Fsms%2Fpicture.jpg
Sending a viber message with the text "Video and button", the button "{button,http://smscentre.com,smsc button}", the picture "http://smscentre.com/upload/files/sms/123456/1.png" and the video "http://smscentre.com/upload/files/sms/123456/1.mp4":

https://smscentre.com/sys/send.php?login=alex&psw=123&phones=79999999999&viber=1&mes=%C2%E8%E4%E5%EE+%E8+%EA%ED%EE%EF%EA%E0+http%3A%2F%2Fsmscentre.com%2Fupload%2Ffiles%2Fsms%2F123456%2F1.png%0Ahttp%3A%2F%2Fsmscentre.com%2Fupload%2Ffiles%2Fsms%2F123456%2F1.mp4%0A%7Bbutton%2Chttp%3A%2F%2Fsmscentre.com%2C%CA%ED%EE%EF%EA%E0+smsc%7D

Sending a message to Telegram

To send the confirmation code to Telegram, you need to call the GET or POST address method: https://smscentre.com/sys/send.php?login=<login>&psw=<password>&phones=<phones>&mes=<message>&tg=1
Only numeric codes with a length from 4 to 8 digits are accepted for sending.

Examples of sending messages to Telegram

Examples:

Sending the confirmation code "123456" to the number "79999999999" in telegram:

https://smscentre.com/sys/send.php?login=alex&psw=123&phones=79999999999&mes=123456&tg=1

Sending a message to the Telegram chatbot

To send a message to the Telegram chatbot, you need to call the GET or POST address method: https://smscentre.com/sys/send.php?login=<login>&psw=<password>&phones=<phones>&mes=<message>&bot=<@botname_bot>

Examples of sending messages to the Telegram chatbot

Examples:

Sending a message with the text "Hello" to the number "79999999999" in the telegram bot "@mybot_bot":

https://smscentre.com/sys/send.php?login=alex&psw=123&phones=79999999999&mes=Hello&bot=@mybot_bot
Sending a message with the text "Hello" by the nickname "alex_nick" to the telegram bot "@mybot_bot":

https://smscentre.com/sys/send.php?login=alex&psw=123&phones=@alex_nick&mes=Hello&bot=@mybot_bot
Sending a message with the text "Hi" by ID 1122334455 to the telegram bot "@mybot_bot":

https://smscentre.com/sys/send.php?login=alex&psw=123&phones=#1122334455&mes=Hi&bot=@mybot_bot
Sending a message with the text "Hello" to the number "79999999999" in the telegram bot "@mybot_bot" with an indication in the smsreq parameter of the number of days after which it will be necessary to confirm the phone number with an SMS code:

https://smscentre.com/sys/send.php?login=alex&psw=123&phones=79999999999&mes=Privet&bot=@mybot_bot&smsreq=25

Using prefixes when sending messages

To send various types of messages you can use the special prefix at the start or instead of text messages.

Supported prefixes:

NameDescription
__CALL__: messageSending a voice message (call). When sending a voice message, you can specify a special combination "\n~~~\n" at the end of the text (line feed, 3 of the tilde character and line feed again), after which you pass the param parameter that defines some characteristics of the call (for more details, see the description). When forming a message, you can specify both text and add wav and mp3 media files, as well as insert previously downloaded files. You can read more about the process of creating a voice message on this page.
__VIBER__: messageSending a message to Viber messenger users.
__SOC__: message Sending a message to users of the social networks "Odnoklassniki", "VKontakte" or users of " Mail.Ru Agent".
__MAIL__: message Sending an E-mail message.
__BOT__: message Sending a message to Telegram chatbot users.
__PING__Sending a special SMS that is not displayed in the phone to check the numbers for availability in real time by the delivery status.
__HLR__A sign of an HLR request to receive information about the number from the operator's database without sending a real SMS. More information on HLR queries can be found here.


Examples:

Sending a voice message with the text "Privet":

https://smscentre.com/sys/send.php?login=alex&psw=123&phones=79999999999&mes=__CALL__%3A%20Privet
Sending Ping-SMS:

https://smscentre.com/sys/send.php?login=alex&psw=123&phones=79999999999&mes=__PING__
Sending an HLR request:

https://smscentre.com/sys/send.php?login=alex&psw=123&phones=79999999999&mes=__HLR__

Managing message templates

To manage message templates, call the appropriate address with the required command and parameters using the GET or POST method.

To create a template: https://smscentre.com/sys/templates.php?add=1&login=<login>&psw=<password>&name=<name>&msg=<msg>
To change the template: https://smscentre.com/sys/templates.php?chg=1&login=<login>&psw=<password>&id=<id>
To delete a template: https://smscentre.com/sys/templates.php?del=1&login=<login>&psw=<password>&id=<id>
To get a list of templates: https://smscentre.com/sys/templates.php?get=1&login=<login>&psw=<password>
The following parameters are 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).
nameTemplate Name.
msgThe text of the message.
formatMessage format:
empty string – not specified.
sms – SMS.
flash – Flash-SMS.
bin – Binary SMS.
push – Wap-push.
mms – MMS.
call – Call.
mail – E-mail.
viber – Viber.
senderSender ID.
fl[1]Use for auto-signing.

If an error occurs, the Server returns the following string:
  • when fmt = 0:
    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).
3The record was not found.
4The IP address is temporarily blocked.
5Save or delete error.
9Attempt to send more than three identical template action requests.
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 creating a template:
  • when fmt = 0: ID - <id>

  • when fmt = 1: <id>

  • when fmt = 2:
    <template>
    <id>id</id>
    </template>

  • when fmt = 3:
    {
    "id": <id>
    }

When changing or deleting a template:
  • when fmt = 0, 1: OK

  • when fmt = 2:
    <result>OK</result>

  • when fmt = 3:
    {
    "result": "OK"
    }


When requesting a list of message templates:
  • when fmt = 0:
    id = <id>, name = <name>, format = <format>, sender = <sender>, flag = <flag>, message = <message>
    ...

  • when fmt = 1:
    <id>,<name>,<format>,<sender>,<flag>,<message>
    ...

  • when fmt = 2:
    <list>
    <template>
    <id>id</id>
    <name>name</name>
    <format>format</format>
    <sender>sender</sender>
    <flag>flag</flag>
    <message>message</message>
    </template>
    ...
    </list>

  • when fmt = 3:
    [{
    "id": <id>,
    "name": "<name>",
    "format": "<format>",
    "sender": "<sender>",
    "flag": <flag>,
    "message": "<message>"
    },
    ...]

Where:
<id> – the template ID assigned by the system automatically.
<name> – template Name.
<format> – message format.
<sender> – sender ID.
<flag> – flag for the template. Setting the first bit of the flag (fl[1]=1) assigns the use of the template for auto-signing.
<message> – the text of the message.

The server does not accept more than three identical requests for actions with templates within a minute to reduce the load and protect against errors and loops in the Client-side program.

Managing operator templates

To manage templates for service, transactional, and other templated messages, you must call the appropriate address using the GET or POST method, specifying the required command and parameters.

To create a template (for all operators): https://smscentre.com/sys/op_templates.php?add=1&login=<login>&psw=<password>&sender=<sender>&msg=<msg>&mts_srv=1&mts_auth=1&mts_trn=1&mega_srv=1&mega_auth=1&mega_trn=1&mega_adv=1&bee_srv=1&bee_trn=1&tele2_srv=1&tele2_trn=1&motiv_srv=1&motiv_trn=1&soc=1
To get information about the template (for all operators): https://smscentre.com/sys/op_templates.php?get=1&login=<login>&psw=<password>&sender=<sender>&msg=<msg>
The following parameters are 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).
senderThe name of the sender for which the template is being created.
msgTemplate text.
charsetThe encoding of the template text, if used other than the default windows encoding-1251. Options: utf-8 and koi8-r.
mts_srvCreate a template for the MTS operator (service messages).
mts_authCreate a template for the MTS operator (authorization messages).
mts_trnCreate a template for the MTS operator (transactional messages).
mega_advCreate a template for the Megafon operator (advertising template messages).
mega_srvCreate a template for the Megafon operator (service (information) messages).
mega_authCreate a template for the Megafon operator (authorization messages).
mega_trnCreate a template for the Megafon operator (transactional messages).
bee_srvCreate a template for the Beeline operator (service messages).
bee_trnCreate a template for the Beeline operator (transactional messages).
tele2_srvCreate a template for the Tele2 operator (service messages).
tele2_trnCreate a template for the Tele2 operator (transactional messages).
motiv_srvCreate a template for the MOTIVE operator (service messages).
motiv_trnCreate a template for the MOTIVE operator (transactional messages).
socCreate a template for a soc message sent to users of the Odnoklassniki, VKontakte, or Mail.Ru Agent social networks".

If an error occurs, the Server returns the following string:
  • when fmt = 0:
    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 ten identical template action requests.
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 creating a template:
  • when fmt = 0:
    name = <status>, id = <id>
    ...

  • when fmt = 1:
    <name>,<status>,<id>
    ...

  • when fmt = 2:
    <result>
    <template>
    <name>name</name>
    <status>status</status>
    <id>id</id>
    </template>
    ...
    </result>

  • when fmt = 3:
    [{
    "name": <status>,
    "id": <id>
    },
    ...]

When requesting a list of templates:
  • when fmt = 0:
    name = <status>, id = <id>
    ...

  • when fmt = 1:
    <name>,<status>,<id>
    ...

  • when fmt = 2:
    <result>
    <template>
    <name>name</name>
    <status>status</status>
    <id>id</id>
    </template>
    ...
    </result>

  • when fmt = 3:
    [{
    "name": <status>,
    "id": <id>
    },
    ...]

Where:
<name> – the name of the operator and the type of messages.
<id> – the template ID assigned by the system automatically.
<status> – the status of the template, can take the following values:

for the add command:
-2 – the specified template cannot be saved;
-1 – the sender name for this template was not found or was not accepted by the operator;
1 – template added successfully;

for the get command:
-1 – the template for the specified operator was not found;
0 – awaiting registration;
1 – sent for registration;
2 – accepted by the operator;
3 – not accepted by the operator;
4 – temporarily disabled.

The server does not accept more than ten identical requests for actions with templates within a minute to reduce the load and protect against errors and loops in the Client-side program.

Virtual sending (test mode)

This mode of operation allows you to test sending messages without actually transmitting them to operators. It can be useful for initial setup and testing of various software and hardware. To enable this mode, you need to go to your personal account under "Settings" in the drop-down block "API Settings", check the box "Test mode (virtual sending without payment)".

During virtual sending, all messages will have the final status "Delivered", but in the process of sending the message, all stages of processing will take place along the chain "Waiting to be sent" – "Transmitted to the operator" – "Delivered". You can receive message statuses both on request and on your http handler. You can send both single messages and mass mailings. It is possible to test various types of messages (SMS, binary messages, HLR, call) during virtual sending, except for e-mail.

Event Notifications

When certain events occur, you may need to send notification messages containing the information necessary to process these events. To solve such problems, you can use the extension of our monitoring system, which allows you to send various notifications through our service from external systems. To do this, in your personal account on the page "Creating a task group" you need to create an appropriate group, where you can specify notification templates, types of messages sent when an event occurs, and contacts for notifications (phone numbers, e-mail addresses, jabber accounts).

To send a notification, you need to call the GET or POST address method: https://smscentre.com/sys/ping.php?login=<login>&psw=<password>&id=<id>
The following parameters are 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).
idID of the task group (the "ID" column").
nameThe name of the rule or server in the task. Replaces the {NAME} macro in the notification text.
hostThe address or IP of the server being checked. Replaces the {HOST} macro.
infoAdditional information about the event. Replaces the {INFO} macro.
okWhen generating a notification, use the following template:
0 – (by default) a task group template is used, which is sent when a failure occurs.
1 – the task group template that is sent during recovery is used.

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).
3Task group not found.
4The IP address is temporarily blocked.
9Attempt to send more than five identical notification requests 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 and fmt = 1: OK

  • when fmt = 2:
    <result>OK</result>

  • when fmt = 3:
    {
    "result": "OK"
    }

The server does not accept more than five identical requests to send a notification within a minute to reduce the load and protect against errors and loops in the Client-side program.

Actions with mailing lists

To create a mailing list, you need to call the GET or POST address method:
https://smscentre.com/sys/jobs.php?add=1&login=<login>&psw=<password>&name=<name>&phones=<phones>&mes=<message>
To delete a mailing list, call the GET or POST address method:
https://smscentre.com/sys/jobs.php?del=1&login=<login>&psw=<password>&id=<id>
To disable a mailing list that is waiting to be sent, you must call the GET or POST address method:
https://smscentre.com/sys/jobs.php?cancel=1&login=<login>&psw=<password>&id=<id>
To get information about a particular mailing list, you need to call the GET or POST address method:
https://smscentre.com/sys/jobs.php?get=1&login=<login>&psw=<password>&id=<id>
To receive mailing list, you need to call method GET or POST address:
https://smscentre.com/sys/jobs.php?get_all=1&login=<login>&psw=<password>
Description of the parameters passed to the Server when creating a mailing list (any of the additional parameters is applied to each message in the mailing list; to work with e-mail newsletters, you must pass the additional parameter mail=1 in the request):

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).
nameMailing list name.
phonesThe number or comma-separated or semicolon-separated list of mobile phone numbers in international format to which the message is sent. Numbers can be passed without the "+ " sign. If the number is passed without the " + " sign, it can be corrected by automatic formatting and converted to the correct international format. Thus, some errors when entering phone numbers can be corrected automatically. To disable auto-correction, pass the number with the "+ " sign.".
You can also send a message to a group of numbersby specifying a special code " G<íîìåð ãðóïïû>". The message will be sent to all numbers belonging to this group. For an e-mail message, a list of recipients' e-mail addresses is transmitted. For telegram, it is possible to specify the subscriber's nickname or ID as the recipient of the message in the form of #ID.
mesThe text of the message being sent. The maximum size is 1000 characters. If necessary, the message will be divided into several SMS messages sent to the subscriber and paid separately. Size of one SMS – 160 characters in Latin or 70 characters in Cyrillic. When splitting a message into multiple SMS messages, a header is added to each part to combine the parts into a single message on the recipient's phone, and the maximum length becomes 67 for Cyrillic and 153 for Latin letters. You can add comments to the message text that are intended for the sender to view the history in the personal account.
Additional options
senderThe sender's name displayed on the recipient's phone. English letters, numbers, spaces, and some characters are allowed. Length – 11 characters or 15 digits. All names are registered in your personal account on this page.
sender2This parameter is used as the sender's name when auto-replaying via SMS in case of non-delivery of messages via the original sending option..
translitA sign that the message you want to translate in translit.
0 (default) – do not translate into transliteration.
1 – translate to translit as " translate".
2 – translate into transliteration as " mpaHc/Ium".
tinyurlAutomatically shorten links in messages. Allows you to replace links in the message text with short ones to reduce the length, as well as to track the number of clicks on this page.
0 (default) – leave links in the message text without changes.
1 – shorten links.
timeThe time of sending the SMS message to the subscriber.
Formats:
  1. DDMMYYhhmm or DD.MM.YY hh: mm.
  2. h1-h2. Sets the time range in hours. If the current time is less than h1, the SMS message will be sent to the subscriber when the time h1 occurs, if the current time falls in the interval from h1 to h2, that message will be sent immediately, otherwise the message will be sent the next day when the h1 time is reached. This function, for example, is useful in order to prevent subscribers from receiving SMS messages at night.
  3. 0ts, where ts is timestamp, the time in seconds since January 1, 1970.
  4. +m. Sets the relative time offset from the current time in minutes. The + character must be encoded as %2B in the http request.
If time = 0 or the time already elapsed is specified, the message will be sent immediately.
rptDetermines the frequency of sending the newly created mailing list.
0 (default) – manually.
1 – every hour.
2 – every day.
3 – every working day.
4 – every weekend.
5 – every week.
6 – every month.
7 – every year.
rptnSets the maximum number of repetitions for a deferred periodic distribution.
tzThe time zone in which the time parameter is set. It is indicated relative to Moscow time. The tz parameter can be either positive or negative. If tz is equal to 0, the Moscow time zone will be used , if the tz parameter is not set, the time zone will be taken from the Client settings.
periodThe period of time during which you need to send the newsletter. Represents a number in the range from 0.1 to 720 hours. Used in conjunction with the freq parameter. This parameter allows you to stretch the mailing list in time for the gradual receipt of SMS messages by subscribers.
freqThe interval or frequency at which to send an SMS message to the next group of numbers. The number of numbers in the group is calculated automatically based on the period and freq parameters. Set in the interval from 1 to 1440 minutes. Without the period parameter, the freq parameter is ignored.
flashIndicates whether a Flash message is displayed immediately on the phone screen.
0 (default) – normal message.
1 – Flash message.
binBinary message flag.
0 (default) – normal message.
1 – binary message. In an http request, it must be encoded using the urlencode function.
2 – binary message, represented as a hexadecimal string (hex).

The binary message is passed along with the UDH header at the beginning in the mes parameter, in which the first byte specifies the length of the header. To send a binary message without a UDH header, specify a null byte at the beginning of the message (00 in hex).
To be able to pass the pid and dcs parameters, you need to add a special combination "\n~~~\n" (line feed, 3 tilde characters, and again line feed) to the end of the binary message, and then the text "pid: value1, dcs: value2" with the exact preservation of spaces.
pushA sign of a wap-push message, with which you can send an Internet link to your phone.
0 (default) – normal message.
1 – wap-push message. In the mes parameter, you must pass the link and title through a line feed.
hlrA sign of the HLR-request for information about the number from the operator's database without sending real SMS.
0 (default) – normal message.
1 – HLR request. An HLR request will be executed for each phone number in the list. The mes parameter is not used.
pingIndicates a special SMS that is not displayed in the phone to check the numbers for availability in real time by the delivery status.
0 (default) – normal message.
1 – ping-sms. A Ping SMS will be sent to each phone number in the list. The mes parameter is not used.
mmsA feature of an MMS message that can be used to transmit text (txt), images in various formats (jpg, gif, png), music (wav, amr, mp3, mid), and video (mp4, 3gp). The files are passed in the body of the http request.
0 (default) – normal message.
1 – An MMS message. An MMS will be sent to each phone number in the list.
mailThe flag of the e-mail message. The files attached to the message are passed by the POST method in the body of the http request..
0 (default) – normal message.
1 – e-mail message.
socA sign of a soc message sent to users of the social networks "Odnoklassniki", "VKontakte" or to users of " Mail.Ru Agent".
0 (default) – normal message.
1 – soc message.
viberFlag of the viber message sent to users of the Viber messenger.
0 (default) – normal message.
1 – viber message.
whatsappA sign of a whatsapp message sent to WhatsApp messenger users.
0 (default) – normal message.
1 – whatsapp message.
tgIf the value of this parameter is set to 1, a telegram message will be sent with the confirmation code passed in the mes parameter.
botBot's name to for sending a message in the format "@botname_bot".
smsreqWhen this parameter is specified, the system will not display the text of the message sent to the user and display a warning about the need to confirm the phone number if more than smsreq days have passed since the last confirmation. Range of values from 10 to 999.
fileurlThe full http address of the file to upload and transmit in the message. The minimum file size is 101 bytes.
mes2This parameter sets the message option to be sent via SMS in the automatic repeat mode in case of non-delivery to alternative routes, for example, sending to messengers. To enable automatic replay, you must additionally pass the fl[5] flagequal to 1 in the request.
callIndicates a voice message. When forming a voice message, you can send both text and attach files. Files added to the message must be passed by the POST method in the body of the http request..
0 (default) – normal message.
1 – voice message.
voiceThe voice used for voicing the text (only for voice messages).
m – male voice.
m2 – male voice 2.
m3 (default) – male voice 3.
m4 – male voice 4.
w – a woman's voice.
w2 – female voice 2.
w3 – female voice 3.
w4 – female voice 4.
When sending messages, it is also possible to specify the language of the text in the form: "m,en", "w,fr", "w,de", etc..
paramComma-separated list of parameters for a voice message in the format " param=w, i,n".
Here:
  • w – the waiting time for the caller to pick up the phone after the call starts, in seconds. If the subscriber does not pick up the phone within the specified time, the call will be repeated with the error "the subscriber is busy". The operating range of the parameter values is from 10 to 35, but you can specify an interval from 0 to 99 (if the value is less than 10, it will be reduced to 10, similarly for the upper bound).
  • i – repeat interval, that is, the time interval after which the call will be repeated (in seconds). The operating range of the parameter is from 10 to 3600 (if the value is less than 10, it will be reduced to 10).
  • n – the total number of dial-up attempts. Operating range of values from 1 to 9 (0 will be reduced to 1).
When specifying the value of any parameter other than the possible ones, the default values of all parameters will be used (n = 8, w = 25, i from 3 to 14 seconds incrementally), except for advertising messages.
subjThe subject of the MMS or e-mail message. When sending an e-mail, you must specify the subject, text, and address of the sender. For MMS , it is mandatory to specify the subject or text. If you do not specify the subject of the MMS, then the sender's name, passed in the request or used by default, will be used as it.
charsetThe encoding of the transmitted message, if used other than the default encoding of windows-1251. Options: utf-8 and koi8-r.
costIndicates whether you need to receive the cost of the mailing list.
0 (default) – normal sending.
1 – add the cost of mailing to the response.
fmtFormat of the server response about successful sending.
0 – (by default) as a string (OK - 1 SMS, ID - 1234).
1 – return the response in the form of numbers: ID and number of SMS separated by commas (1234,1), with cost = 2, another comma-separated cost (1234,1,1.40), with cost = 3, another new Customer balance (1234,1,1.40,100.50), with cost = 1, the cost and quantity Comma separated SMS (1.40,1).
2 – response in xml format.
3 – response in json format.
listA list of phone numbers and their corresponding messages, separated by a colon or semicolon, and presented as:
phones1:mes1
phones2:mes2
...
Lines are separated by a newline character (%0A). As phones, you can specify multiple phone numbers separated by commas. If you want to pass a newline character in the mes message, specify it with \n. If it is not possible to correct the text of a multi-line message, it is possible to enable a special mode for transmitting this type of message. To do this, you must additionally pass the nl parameterequal to 1 in the request.
If it is necessary to transmit different names of senders (and possibly different time zones of subscribers (works only for requests in which the time parameter is represented as DDMMYYhhmm or DD.MM.YY hh:mm)) The following transmission format can be used for different messages:
sender1,tz1|phones1:mes1
sender2,tz2|phones2:mes2
...
In this case, the tz parameter is optional.
The list parameter allows you to send multiple messages with different messages to multiple phones. an http request. The messages in the request are assigned a single identifier. The entire parameter must be encoded using the urlencode function.
tplID of the template to be used as the message text. To use the template , the mes parameter must be empty.
validThe "life" period of the SMS message. Specifies the time during which the operator will attempt to deliver the message to the subscriber. Range from 1 to 24 hours. It is also possible to transmit the time in the hh:mm format in the range from 00:01 to 24:00.

The required parameters are login, psw, name, phones and mes or login, psw, name and list.

Description of the parameters passed to the Server when deleting, disabling, or receiving the mailing list:

OptionThe value
loginCustomer Login.
pswClient Password (you can add or change it on this page).
idID of the mailing list. Returned by the Server after creation and used for further identification of the mailing list.
Additional options
startThe date from which you want to receive the mailing list. If this parameter is omitted, it returns the mailing list for the last 2 months, but no more than 10. It is used in conjunction with the get_all parameter. Format: 'dd.mm.yyyy'.
endThe date before which you want to receive the mailing list. If this parameter is omitted, the mailing list is returned up to the current date, but no more than 10. It is used in conjunction with the get_all parameter. Format: 'dd.mm.yyyy'.

Required parameters are login, psw, and id.

After receiving and processing the data, the Server returns a confirmation to the Client indicating the result of processing.

All parameters that contain special characters (plus, space, etc.) must be encoded using the urlencode function to be passed in an HTTP request..

Mailing. Server response and error codes

The server sends the response as a string:

If an error occurred, the response will be one of the following:

When fmt = 0:
  • ERROR = N (description) – for 1,2,3,4,5,9 errors.
When fmt = 1:
  • 0,-N – for errors 1,2,3,4,5,9.
When fmt = 2:
  • For 1 errors,2,3,4,5,9:
    <result>
    <error>description</error>
    <error_code>N</error_code>
    </result>
When fmt = 3:
  • For 1 errors,2,3,4,5,9:
    {
    "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).
3Error saving a record.
4IP address is temporarily blocked due to frequent errors in the queries. read More
5Invalid date format.
9Sending more than one identical request for actions with mailing lists 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 processed successfully, a string of the following format is returned:

When creating a mailing list:
  • when cost = 0 and fmt = 0: OK, ID - <id>

  • when cost = 1 and fmt = 0: OK, ID - <id>, COST - <cost>

  • when cost = 0 and fmt = 1: <id>

  • when cost = 1 and fmt = 1: <id>,<cost>

  • when cost = 0 and fmt = 2:
    <result>
    <id>id</id>
    </result>

  • when cost = 1 and fmt = 2:
    <result>
    <id>id</id>
    <cost>cost</cost>
    </result>

  • when cost = 0 and fmt = 3:
    {
    "id": <id>
    }

  • when cost = 1 and fmt = 3:
    {
    "id": <id>,
    "cost": "<cost>"
    }

When you disable or delete a mailing list:

  • when fmt = 0,1: OK

  • when fmt = 2:
    <result>OK</result>

  • when fmt = 3:
    {
    "result": "OK"
    }

When receiving information about a specific mailing list (when mail=1, the "phones" parameter is replaced with " emails"):

  • when fmt = 0: <id>|<name>|<subject>|<repeat_send>|<repeat_cnt>|<created>|<changed>|<need_date>|<last_sent>|<phones>|<message>|<format>|<validity>|<period>|<frequency>|<status>|<sender_id>

  • when fmt = 1: <id>;<name>;<subject>;<repeat_send>;<repeat_cnt>;<created>;<changed>;<need_date>;<last_sent>;<phones>;<message>;<format>;<validity>;<period>;<frequency>;<status>;<sender_id>

  • when fmt = 2:
    <job>
    <id>id</id>
    <name>name</name>
    <subject>subject</subject>
    <repeat_send>repeat_send</repeat_send>
    <repeat_cnt>repeat_cnt</repeat_cnt>
    <created>created</created>
    <changed>changed</changed>
    <need_date>need_date</need_date>
    <last_sent>last_sent</last_sent>
    <phones>phones</phones>
    <message>message</message>
    <format>format</format>
    <validity>validity</validity>
    <period>period</period>
    <frequency>frequency</frequency>
    <status>status</status>
    <sender_id>sender_id</sender_id>
    </job>

  • when fmt = 3:
    [
    {
    "id": <id>,
    "name": "<name>",
    "subject": "<subject>",
    "repeat_send": <repeat_send>,
    "repeat_cnt": <repeat_cnt>,
    "created": "<created>",
    "changed": "<changed>",
    "need_date": "<need_date>",
    "last_sent": "<last_sent>",
    "phones": "<phones>",
    "message": "<message>",
    "format": <format>,
    "validity": <validity>,
    "period": "<period>",
    "frequency": <frequency>,
    "status": <status>,
    "cost": "<cost>",
    "sms_sent": <sms_sent>,
    "sms_ok": <sms_ok>,
    "sender_id": "<sender_id>"
    }
    ]


When receiving a mailing list (when mail=1, the "phones" parameter is replaced with " emails"):

  • when fmt = 0: <id>|<name>|<changed>|<need_date>|<last_sent>|<phones>|<message>|<phones_cnt>|<cost>|<status>|<sender_id>|<format>

  • when fmt = 1: <id>;<name>;<changed>;<need_date>;<last_sent>;<phones>;<message>;<phones_cnt>;<cost>;<status>;<sender_id>;<format>

  • when fmt = 2:
    <sms_jobs>
    <job>
    <id>id</id>
    <name>name</name>
    <changed>changed</changed>
    <need_date>need_date</need_date>
    <last_sent>last_sent</last_sent>
    <phones>phones</phones>
    <message>message</message>
    <phones_cnt>phones_cnt</phones_cnt>
    <cost>cost</cost>
    <status>status</status>
    <sender_id>sender_id</sender_id>
    <format>format</format>
    </job>
    ...
    </sms_jobs>

  • when fmt = 3:
    [
    {
    "id": <id>,
    "name": "<name>",
    "changed": "<changed>",
    "need_date": "<need_date>",
    "last_sent": "<last_sent>",
    "phones": "<phones>",
    "message": "<message>",
    "phones_cnt": <phones_cnt>,
    "cost": "<cost>",
    "status": <status>,
    "sender_id": "<sender_id>",
    "format": <format>,
    "sms_sent": <sms_sent>,
    "sms_ok": <sms_ok>
    },
    ...
    ]

Where:
<id> – the distribution ID sent by the Client or assigned by the Server automatically.
<name> – mailing list name.
<subject> – subject (for e-mail newsletters).
<repeat_send> – repeat period.
<repeat_cnt> – the number of repetitions of the mailing list.
<created> – mailing list creation date.
<changed> – date of mailing list change.
<need_date> – scheduled date of dispatch.
<last_sent> – last sent date.
<phones> (<emails>) – list of phone numbers (e-mail addresses) of message recipients.
<message> – the text of the message.
<format> – message format.
<validity> – "lifetime" of the message.
<period> – message sending interval.
<frequency> – frequency of sending messages.
<status> – mailing list status.
<sender_id> – sender ID.
<phones_cnt> – number of recipients.
<cost> – cost of sending.
<sms_sent> – number of messages sent.
<sms_ok> – number of messages delivered.

Examples of sending operations

Examples:

Creating an SMS mailing list:

https://smscentre.com/sys/jobs.php?add=1&login=alex&psw=123&phones=79999999999&name=Privet&mes=Hello!
Creating a mailing list with a voice message:

https://smscentre.com/sys/jobs.php?add=1&login=alex&psw=1234567890&phones=79999999999&call=1&voice=w2&name=Privet&mes=Hello!
Create a mailing list with an e-mail message to the address "alex@mysite.com" with the subject "Hi" and text "Hello!" from the sender "alex2@mysite2.com" and the title of the mailing "Privet":

https://smscentre.com/sys/jobs.php?add=1&login=alex&psw=123&phones=alex%40mysite.com&mail=1&name=Privet&mes=Hello!&subj=Hi&sender=alex2%40mysite2.com
Creating a Viber mailing list with macros and auto-repeat via SMS (the text of the SMS is different from the text of the Viber message) to several numbers (the message texts must be encoded using the urlencode function):

https://smscentre.com/sys/jobs.php?add=1&login=alex&psw=123&phones=79999999999,78888888888&name=rassilka1&mes={Name}, this is a Viber message&mes2=This is an SMS for {Name}&sender=MyViber&fl[5]=1&viber=1
Deleting a created mailing list with an id equal to 701:

https://smscentre.com/sys/jobs.php?del=1&login=alex&psw=123&id=701
Disable deferred mailing with id equal to 701:

https://smscentre.com/sys/jobs.php?cancel=1&login=alex&psw=123&id=701

Checking the status

To check the delivery status of SMS or e-mail, you need to call the GET or POST address method: https://smscentre.com/sys/status.php?login=<login>&psw=<password>&phone=<phone>&id=<sms_id>
The following parameters are 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).
phoneA phone number or a comma-separated list of numbers when requesting the statuses of multiple SMS messages. For multiple requests, the numbers in the list must be be listed in the order corresponding to the message IDs. To preserve the format of a multiple request, when requesting the status of a single message , enter a comma after the phone number. This description is also suitable for e-mail messages.
idMessage ID or a comma-separated list of IDs when requesting the statuses of multiple messages. To preserve the format of a multiple request when requesting the status of a single message, specify a comma after the message ID.
fmtServer response format:
0 – (default) as a string (Status = 1, check_time = 10.10.2010 10:10:10).
1 – in the form of a status number and a time stamp separated by commas (1,1286524541).
2 – in xml format.
3 – in json format.
all0 – (by default) get the status of the message in the usual format.
1 – get full information about the sent message.
2 – add data about the subscriber's country, operator, and region to the message information.
charsetThe encoding of the query result, if used other than the default windows encoding-1251. Options: utf-8 and koi8-r.
del1 – delete a previously sent message. Used in conjunction with the phone and id parameters. This parameter is described in more detail here.

Message statuses. Server response and error codes

If an error occurs, the Server returns the following string:
  • When fmt = 0:
    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.
5Error deleting a message.
9Attempt to send more than five requests to get the status of the same message or more than one mass request within a minute.
This error also occurs when you try to send five 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:

Responses for SMS messages:
  • with fmt = 0 and all = 0: Status = <status>, check_time = <last_date>, err = <err>

  • with fmt = 1 and all = 0: <status>,<last_timestamp>,<err>

  • with fmt = 2 and all = 0:
    <sms>
    <status>status</status>
    <last_date>last_date</last_date>
    <last_timestamp>last_timestamp</last_timestamp>
    <flag>flag</flag>
    <err>err</err>
    </sms>

  • with fmt = 3 and all = 0:
    {
    "status": <status>,
    "last_date": "<last_date>",
    "last_timestamp": <last_timestamp>,
    "flag": <flag>,
    "err": <err>
    }

  • with fmt = 0 and all = 1:
    Status = <status>, check_time = <last_date>, err = <err>, send_date = <send_date>, phone = <phone>, cost = <cost>, sender_id = <sender>, status_name = <status_name>, message = <message>, comment = <comment>, type = <type>

  • with fmt = 1 and all = 1:
    <status>,<last_timestamp>,<err>,<send_timestamp>,<phone>,<cost>,<sender>,<status_name>,<message>, <comment>, <type>

  • with fmt = 2 and all = 1:
    <sms>
    <status>status</status>
    <last_date>last_date</last_date>
    <last_timestamp>last_timestamp</last_timestamp>
    <flag>flag</flag>
    <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>
    <comment>comment</comment>
    <type>type</type>
    <sms_cnt>sms_cnt</sms_cnt>
    </sms>

  • with fmt = 3 and all = 1:
    {
    "status": <status>,
    "last_date": "<last_date>",
    "last_timestamp": <last_timestamp>,
    "flag": <flag>,
    "err": <err>,
    "send_date": "<send_date>",
    "send_timestamp": <send_timestamp>,
    "phone": "<phone>",
    "cost": "<cost>",
    "sender_id": "<sender>",
    "status_name": "<status_name>",
    "message": "<message>",
    "comment": "<comment>",
    "type": <type>,
    "sms_cnt": <sms_cnt>
    }

  • with fmt = 0 and all = 2:
    Status = <status>, check_time = <last_date>, err = <err>, send_date = <send_date>, phone = <phone>, mccmnc = <mccmnc>, country = <country>, operator = <operator>, operator_orig= <operator_orig>, region = <region>, cost = <cost>, sender_id = <sender>, status_name = <status_name>, message = <message>, comment = <comment>, type = <type>

  • with fmt = 1 and all = 2:
    <status>,<last_timestamp>,<err>,<send_timestamp>,<phone>,<country>,<operator>,<region>,<cost>,<sender>,<status_name>,<message>, <comment>, <type>

  • with fmt = 2 and all = 2:
    <sms>
    <status>status</status>
    <last_date>last_date</last_date>
    <last_timestamp>last_timestamp</last_timestamp>
    <flag>flag</flag>
    <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>
    <comment>comment</comment>
    <mccmnc>mccmnc</mccmnc>
    <country>country</country>
    <operator>operator</operator>
    <operator_orig>operator_orig</operator_orig>
    <region>region</region>
    <type>type</type>
    <sms_cnt>sms_cnt</sms_cnt>
    </sms>

  • with fmt = 3 and all = 2:
    {
    "status": <status>,
    "last_date": "<last_date>",
    "last_timestamp": <last_timestamp>,
    "flag": <flag>,
    "err": <err>,
    "send_date": "<send_date>",
    "send_timestamp": <send_timestamp>,
    "phone": "<phone>",
    "cost": "<cost>",
    "sender_id": "<sender>",
    "status_name": "<status_name>",
    "message": "<message>",
    "comment": "<comment>",
    "mccmnc": "<mccmnc>",
    "country": "<country>",
    "operator": "<operator>",
    "operator_orig": "<operator_orig>",
    "region": "<region>",
    "type": <type>,
    "sms_cnt": <sms_cnt>
    }
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.
<flag> is a flag in the form of a 2 byte number containing various information about the message. Combinations of bit values of different characteristics are possible. Bits 0-3 (message type): 0 – SMS, 1 – Flash-SMS, 2 – Binary SMS, 3 – Wap-push, 4 – HLR-request, 5 – Ping-SMS, 6 – MMS, 7 – Call, 8 – E-mail, 10 – Viber, 12 – Social Networks.
Bit 5 – payment of the message from the second balance. Bit 8 is a sign of a template message.
Bits 10,9 are the type of template message (00 - service, 01 - transactional, 10 - authorization, 11 - advertising).
<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 or e-mail address.
<country> – name of the country of registration of the subscriber number.
<operator> – current mobile operator of the subscriber.
<operator_orig> – the subscriber's operator by mobile code before porting the number.
<region> – region of registration of the subscriber number.
<cost> – message cost.
<sender> – sender ID.
<status_name> – status name.
<message> – the text of the message.
<comment> – message comment.
<mccmnc> – the numeric code of the subscriber's country plus the numeric code of the subscriber's operator.
<type><type> - message type (0 – SMS, 1 – Flash-SMS, 2 – Binary SMS, 3 – Wap-push, 4 – HLR-request, 5 – Ping-SMS, 6 – MMS, 7 – Call, 8 – E-mail, 10 – Viber, 12 – Social Networks).
<sms_cnt> – number of parts in an SMS message (or seconds in a voice message).

Responses for HLR queries:
  • with fmt = 0 and all = 0:
    Status = <status>, check_time = <check_time>, err = <err>, imsi = <imsi>, msc = <msc>, mcc = <mcc>, mnc = <mnc>, cn = <cn>, net = <net>, rcn = <rcn>, rnet = <rnet>

  • with fmt = 1 and all = 0: <status>,<last_timestamp>,<err>,<imsi>,<msc>,<mcc>,<mnc>,<cn>,<net>,<rcn>,<rnet>

  • with fmt = 2 and all = 0:
    <sms>
    <status>status</status>
    <last_date>last_date</last_date>
    <last_timestamp>last_timestamp</last_timestamp>
    <flag>flag</flag>
    <err>err</err>
    <imsi>imsi</imsi>
    <msc>msc</msc>
    <mcc>mcc</mcc>
    <mnc>mnc</mnc>
    <cn>cn</cn>
    <net>net</net>
    <rcn>rcn</rcn>
    <rnet>rnet</rnet>
    </sms>

  • with fmt = 3 and all = 0:
    {
    "status": <status>,
    "last_date": "<last_date>",
    "last_timestamp": <last_timestamp>,
    "flag": <flag>,
    "err": <err>,
    "imsi": "<imsi>",
    "msc": "<msc>",
    "mcc": "<mcc>",
    "mnc": "<mnc>",
    "cn": "<cn>",
    "net": "<net>",
    "rcn": "<rcn>",
    "rnet": "<rnet>"
    }

  • with fmt = 0 and all = 1:
    Status = <status>, check_time = <check_time>, err = <err>, imsi = <imsi>, msc = <msc>, mcc = <mcc>, mnc = <mnc>, cn = <cn>, net = <net>, rcn = <rcn>, rnet = <rnet>, send_date = <send_date>, phone = <phone>, cost = <cost>, sender_id = <sender_id>, status_name = <status_name>, message = <message>, type = <type>

  • with fmt = 1 and all = 1:
    <status>,<last_timestamp>,<err>,<imsi>,<msc>,<mcc>,<mnc>,<cn>,<net>,<rcn>,<rnet>, <send_timestamp>,<phone>,<cost>,<sender_id>,<status_name>,<message>,<type>

  • with fmt = 2 and all = 1:
    <sms>
    <status>status</status>
    <last_date>last_date</last_date>
    <last_timestamp>last_timestamp</last_timestamp>
    <flag>flag</flag>
    <err>err</err>
    <imsi>imsi</imsi>
    <msc>msc</msc>
    <mcc>mcc</mcc>
    <mnc>mnc</mnc>
    <cn>cn</cn>
    <net>net</net>
    <rcn>rcn</rcn>
    <rnet>rnet</rnet>
    <send_date>send_date</send_date>
    <send_timestamp>send_timestamp</send_timestamp>
    <phone>phone</phone>
    <cost>cost</cost>
    <sender_id>sender_id</sender_id>
    <status_name>status_name</status_name>
    <message>message</message>
    <type>type</type>
    </sms>

  • with fmt = 3 and all = 1:
    {
    "status": <status>,
    "last_date": "<last_date>",
    "last_timestamp": <last_timestamp>,
    "flag": <flag>,
    "err": <err>,
    "imsi": "<imsi>",
    "msc": "<msc>",
    "mcc": "<mcc>",
    "mnc": "<mnc>",
    "cn": "<cn>",
    "net": "<net>",
    "rcn": "<rcn>",
    "rnet": "<rnet>",
    "send_date": "<send_date>",
    "send_timestamp": <send_timestamp>,
    "phone": "<phone>",
    "cost": "<cost>",
    "sender_id": "<sender>",
    "status_name": "<status_name>",
    "message": "<message>",
    "type": <type>
    }

  • with fmt = 0 and all = 2:
    Status = <status>, check_time = <check_time>, err = <err>, imsi = <imsi>, msc = <msc>, mcc = <mcc>, mnc = <mnc>, cn = <cn>, net = <net>, rcn = <rcn>, rnet = <rnet>, send_date = <send_date>, phone = <phone>, country = <country>, operator = <operator>, region = <region>, cost = <cost>, sender_id = <sender_id>, status_name = <status_name>, message = <message>, type = <type>

  • with fmt = 1 and all = 2:
    <status>,<last_timestamp>,<err>,<imsi>,<msc>,<mcc>,<mnc>,<cn>,<net>,<rcn>,<rnet>, <send_timestamp>,<phone>,<country>,<operator>,<region>,<cost>,<sender_id>,<status_name>,<message>,<type>

  • with fmt = 2 and all = 2:
    <sms>
    <status>status</status>
    <last_date>last_date</last_date>
    <last_timestamp>last_timestamp</last_timestamp>
    <flag>flag</flag>
    <err>err</err>
    <imsi>imsi</imsi>
    <msc>msc</msc>
    <mcc>mcc</mcc>
    <mnc>mnc</mnc>
    <cn>cn</cn>
    <net>net</net>
    <rcn>rcn</rcn>
    <rnet>rnet</rnet>
    <send_date>send_date</send_date>
    <send_timestamp>send_timestamp</send_timestamp>
    <phone>phone</phone>
    <cost>cost</cost>
    <sender_id>sender_id</sender_id>
    <status_name>status_name</status_name>
    <message>message</message>
    <country>country</country>
    <operator>operator</operator>
    <region>region</region>
    <type>type</type>
    </sms>

  • with fmt = 3 and all = 2:
    {
    "status": <status>,
    "last_date": "<last_date>",
    "last_timestamp": <last_timestamp>,
    "flag": <flag>,
    "err": <err>,
    "imsi": "<imsi>",
    "msc": "<msc>",
    "mcc": "<mcc>",
    "mnc": "<mnc>",
    "cn": "<cn>",
    "net": "<net>",
    "rcn": "<rcn>",
    "rnet": "<rnet>",
    "send_date": "<send_date>",
    "send_timestamp": <send_timestamp>,
    "phone": "<phone>",
    "cost": "<cost>",
    "sender_id": "<sender>",
    "status_name": "<status_name>",
    "message": "<message>",
    "country": "<country>",
    "operator": "<operator>",
    "region": "<region>",
    "type": <type>
    }

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.
<flag> is a flag in the form of a 2 byte number containing various information about the message. Combinations of bit values of different characteristics are possible. Bits 0-3 (message type): 0 – SMS, 1 – Flash-SMS, 2 – Binary SMS, 3 – Wap-push, 4 – HLR-request, 5 – Ping-SMS, 6 – MMS, 7 – Call, 8 – E-mail, 10 – Viber, 12 – Social Networks.
Bit 5 – payment of the message from the second balance. Bit 8 is a sign of a template message.
<err> – hLR error code or subscriber status code (list).
<imsi> – unique IMSI code of the subscriber's SIM card.
<msc> – the number of the service center of the operator in whose network the subscriber is located.
<mcc> – numeric code of the subscriber's country.
<mnc> – numeric code of the subscriber's operator.
<cn> – name of the country of registration of the subscriber.
<net> – name of the subscriber registration operator.
<rcn> – the name of the roaming country of the subscriber when he is in a foreign network.
<rnet> – the name of the roaming operator of the subscriber when he is in someone else's network.
<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.
<cost> – message cost.
<sender> – sender ID.
<status_name> – status name.
<message> – the text of the message.
<type><type> - message type (for HLR, it is equal to 4).

If the message is not found or is in the archive database (the status value is -3), then the status code in the appropriate format is returned for fmt = 0,2,3 . For fmt = 1, a response is returned in the format of the status of a regular message.

When multiple statuses are requested:
  • for fmt = 0 and fmt = 1, the result returns a list of lines, each of which contains information about the status of the corresponding message.
  • for fmt = 2, the format of the returned statuses is similar to the format for single messages, with the entire list of statuses contained in the "<list>" tag.
  • for fmt = 3, the format is also similar to the format for single messages, statuses are separated by commas, and the entire list is framed by square brackets.
In the case of multiple status requests, when the parameter all = 1 or all = 2 is set, the message identifier is additionally returned for each status . If all = 0, the message ID and phone number are additionally returned.

Status codes

Possible variants of message status codes or HLR requests (values of <status>):

CodeNameDescription
-3Message not foundOccurs if no message was found for the specified phone number and ID.
-2StoppedOccurs in messages from the mailing list that did not have time to leave the operator until the moment of temporary suspension of this mailing on the pageMailing lists and tasks.
-1Waiting sendIf the time of receiving the message was set by the subscriber when sending the message, then the message will remain in this status until this time, in other cases, the message will remain in this status for a short time before being sent to the SMS center.
0Transferred to the operatorThe message was sent to the operator's SMS center for delivery.
1DeliveredThe message was successfully delivered to the subscriber.
2ReadThe message was read (opened) by the subscriber. This status is possible for e-mail messages that have the format of an html document.
3ExpiredOccurs if the message "life" time has expired, but it has not been delivered to the recipient, for example, if the subscriber was not available for a certain time or the message buffer in his phone was full.
4Click on linkThe message was delivered and the subscriber clicked the short link passed in the message. This status is possible when the options "Automatically shorten links in messages" and "track subscriber numbers" are enabled in the settings".
20Unable to deliverThe attempt to deliver the message failed, this can be caused by various reasons, for example,, subscriber is blocked, does not exist, it is roaming without SMS exchange support, or his phone doesn't support receiving SMS messages.
22Wrong numberIncorrect phone number format.
23BannedOccurs when restrictions are triggered on sending duplicates, on frequent messages to a single number (flood), on numbers from the blacklist, on texts prohibited by the spam filter or senders ' names (Sender ID).
24Insufficient fundsThe Client's account does not have enough money to send the message.
25Unavailable numberThe phone number does not accept SMS messages, or there is no working route to this operator.

The request for message statuses must be made within one day from the date of sending. After this time, the messages are placed in the archive database. Messages with the final status sent before 18:00 of the previous day are transferred to 03:00 Moscow time. To get the real status of such messages, please contact the support service.

Also, the server does not accept more than five identical requests for the status of the same message or more than one mass request within a minute to reduce the load and protect against errors and loops in the Client-side program.

Error codes in the status

Possible error codes in the status of messages or HLR requests (values of <err>):

CodeNameDescription
0No errorThe subscriber exists and is available.
1The subscriber does not existThe specified phone number does not exist.
6Subscriber is offlineThe subscriber's phone is disconnected or out of range of the network.
11The service is not connectedMeans that the subscriber cannot accept the SMS message. For example, the service is not connected, or the subscriber is roaming, where message reception is not activated, or the subscriber's operator does not exchange SMS messages with the current roaming operator. It can also be a landline number without receiving messages.
12Error in the subscriber's phoneThe message cannot be delivered to the subscriber due to an error in the phone or SIM card.
13Subscriber is blockedOccurs, for example, if the subscriber's account has a zero or negative balance, and it is roaming, or blocked by the operator for prolonged non-payment, or voluntarily by the subscriber himself. This error can also be returned if the SIM card is damaged or if the PIN and PUK codes of the SIM card are entered incorrectly.
21No support for the serviceThe subscriber's device does not support this service (service).
200Virtual sendingThis notification appears under the message status if the message is sent in test mode (if the "Test mode (virtual sending without payment)" checkbox is set in the settings )").
219SIM Card ReplacementError sending a message due to the subscriber replacing the SIM card. After the physical replacement of the SIM card, the subscriber is blocked from receiving messages from the letter names of the senders for 24 hours. The block can be lifted by adding 100 rubles to the balance..
220Queue overflowed from operatorThis error may occur when the subscriber is not available to receive SMS messages, but messages continue to arrive to the operator and the internal message queue for this subscriber is overflowing. In rare cases, an error may occur as a result of a failure in the network of the operator itself or an overflow of the general message queue. In all such situations, the system tries to resend the specified messages several times at certain intervals.
237The caller is not respondingOccurs if the caller did not pick up the phone during the dial attempt.
238No templateOccurs if sending a message is possible only according to a certain template, and the message being sent does not satisfy it.
239Forbidden ip addressOccurs when trying to send a message from an ip address that is not included in the list of ip addresses allowed by the Client to send. It can also occur when you try to send a message from an ip address that was not previously used for sending messages and logging in to your personal account.
240Subscriber is busyOccurs when sending a voice message to a subscriber if the line is busy or the subscriber has canceled the call.
241Conversion errorAn audio conversion error occurred when converting a text or audio file to the destination format for sending a voice message to the subscriber. This error may also occur during transmission SMS messages in separate parts, when not all parts are transmitted to the operator.
242Recorded answering machineMeans that an answering machine was fixed on the subscriber's side when the voice message was sent .
243No contractOccurs when you try to send mailings of an advertising or mass nature without a signed contract.
244Mailing is prohibitedIt means that the sending of mass and advertising mailings is prohibited for this Client, or a prohibited link is found in the message text.
245Status is not receivedDuring the day, the delivery status was not received from the operator, in this case, it is impossible to say for sure whether the message was delivered or not.
246Time limitIf the "Sending time" is set in the "Settings" section of the "Limits and Restrictions" tab in your personal account and the "prohibit sending at another time" checkmark is checked, then when you try to send SMS messages in a time period other than that specified in the "Sending Time" field, sending messages will be prohibited with this error.
247Limit exceeded messagesExceeded the total daily message limit specified by the Client in the personal account in the "Settings" section".
248No routeThis means that sending messages to this number is not available in our service. For example, you entered a non-existent mobile code, or there is no working SMS gateway for the specified number and text.
249Invalid number formatOccurs when the mobile code of the specified number and the number length corresponding to this code are incorrect.
250Telephone number is forbidden settingsThe number fell under the restrictions set by the Client for mobile numbers in the personal account in the "Settings" section".
251Limit is exceeded on a single numberExceeded the daily message limit per number. The limit is set By the Client in the personal account in the "Settings"section. Also, this error is possible when sending more than 50 messages to one subscriber, which were sent with a break between messages of less than 30 seconds.
252Number not permittedOccurs, for example, when a Client tries to specify one of our federal numbers as the recipient of an SMS message.
253Prohibited spam filterIf the text of the message contains obscene expressions and insults, calls to send sms and some other prohibited texts, then sending the message will be blocked. It is also forbidden to specify as the sender short paid numbers, the number of the recipient of messages, the names of operators, other people's Internet resources, companies and government organizations.
254Unregistered sender idThis error occurs when you try to send a message from an unregistered sender name.
255Rejected by operatorThe operator rejected the message without specifying the exact error code.
This happens, for example, when the number does not belong to any mobile operator, i.e. with a non-existent code, or for some other reason, the operator cannot deliver the message.

Possible error codes in the status of e-mail messages (values of <err>):

CodeNameDescription
0No errorThe recipient exists and is available.
1Recipient does not existThe specified e-mail address does not exist.
2Crowded InboxThe recipient's mail server rejected the message with the specified error code.
3Recipient server was not foundThe domain specified as the mail server was not found.
4Mailbox is lockedAn error returned from the recipient's mail server stating that the message could not be delivered due to the mailbox being blocked.
239Forbidden ip addressOccurs when trying to send a message from an ip address that is not included in the list of ip addresses allowed by the Client to send. It can also occur when you try to send a message from an ip address that was not previously used for sending messages and logging in to your personal account.
245Status is not receivedDuring the day, the delivery status was not received from the recipient's mail server, in this case it is impossible to say for sure whether the message was delivered or not.
248No routeIt means that sending messages to this e-mail address is not available in our service. For example, there is no working e-mail gateway for the specified address and text.
249Invalid format'Occurs when the recipient's e-mail address is entered incorrectly in the format.
252E-mail address is prohibitedOccurs, for example, when the specified e-mail address is found in the blacklist.
253Prohibited spam filterIf the text of the message contains obscene expressions and insults, calls to send sms or e-mail and some other prohibited texts, then sending the message will be blocked. It is also prohibited to specify as the sender the e-mail address of the recipient of the message, the addresses of other people's Internet resources, companies and government organizations.
254Unregistered senderThis error occurs when trying to send a message from an unregistered e-mail address of the sender.
255Rejected by the recipient serverThe recipient's mail server rejected the message without specifying the exact error code.
This happens, for example, when an internal server error occurs when it cannot process a message.

Deleting a message

To delete a message, you need to call the status request script using the GET or POST method, specifying the del command: https://smscentre.com/sys/status.php?del=1&login=<login>&psw=<password>&phone=<phone>&id=<sms_id>
The description of the parameters passed to the Server and the errors returned by it is similar to the one given for the status request function.

If the request is successful, the Server returns a response in the form of a string:
  • when fmt = 0,1: OK

  • when fmt = 2:
    <result>OK</result>

  • when fmt = 3:
    {
    "result": "OK"
    }

Messages must be deleted before being transferred to the archive database.

Checking the balance status

Balance Request

To request a balance, use the address: https://smscentre.com/sys/balance.php?login=<login>&psw=<password>
The following parameters are 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).
curFlag indicating whether the Client's currency name should be added to the server response.
fmtServer response format:
0 or 1 – (default) as a string (250.80).
2 – in xml format.
3 – in json format.

Balance. Server response and error codes

If an error occurs, the Server returns the following string:
  • When fmt = 0:
    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 ten balance requests 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 cur = 0:
  • when fmt = 0 or 1: <balance>

  • when fmt = 2: <balance>balance</balance>

  • when fmt = 3:
    {
    "balance": "<balance>"
    }

With cur = 1 and a non-zero credit:
  • when fmt = 0: <balance> <currency>

  • when fmt = 1: <balance>,<currency>

  • When fmt = 2:
    <result>
    <balance>balance</balance>
    <credit>credit</credit>
    <currency>currency</currency>
    </result>

  • when fmt = 3:
    {
    "balance": "<balance>",
    "credit": "<credit>",
    "currency": "<currency>"
    }
Where:
<balance> – current balance status.
<credit> – current status of the established credit.
<currency> – customer's Currency.

The server does not accept more than ten balance requests per minute to reduce the load and protect against errors and loops in the Client-side program.

Actions with contacts and groups

To manage contacts or groups, use the GET or POST method to call the appropriate address with the required command and parameters..

To create a contact: https://smscentre.com/sys/phones.php?add=1&login=<login>&psw=<password>&phone=<phone>&name=<name>
To create a new group: https://smscentre.com/sys/phones.php?add_group=1&login=<login>&psw=<password>&name=<name>
To change the phone number in a contact: https://smscentre.com/sys/phones.php?chg=1&login=<login>&psw=<password>&phone=<phone>&new_phone=<new_phone>
To change the group name: https://smscentre.com/sys/phones.php?chg_group=1&login=<login>&psw=<password>&grp=<group_id>&name=<name>
To transfer a contact to a new group: https://smscentre.com/sys/phones.php?move_group=1&login=<login>&psw=<password>&grp=<group_id>&phone=<phone>
To add a new group to a contact: https://smscentre.com/sys/phones.php?move_group=2&login=<login>&psw=<password>&grp=<group_id>&phone=<phone>
To remove a contact from a group: https://smscentre.com/sys/phones.php?move_group=3&login=<login>&psw=<password>&grp=<group_id>&phone=<phone>
To delete a contact: https://smscentre.com/sys/phones.php?del=1&login=<login>&psw=<password>&phone=<phone>
To delete a group: https://smscentre.com/sys/phones.php?del_group=1&login=<login>&psw=<password>&grp=<group_id>
To display a list of contacts: https://smscentre.com/sys/phones.php?get=1&login=<login>&psw=<password>
To display a list of groups: https://smscentre.com/sys/phones.php?get_group=1&login=<login>&psw=<password>
To add an entry to the blacklist: https://smscentre.com/sys/phones.php?add_black=1&login=<login>&psw=<password>&phone=<phone>
To remove an entry from the blacklist: https://smscentre.com/sys/phones.php?del_black=1&login=<login>&psw=<password>&phone=<phone>
To get the elements of the "black" list: https://smscentre.com/sys/phones.php?get_black=1&login=<login>&psw=<password>

Contacts and groups. Description of the parameters

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).
nameContact or group name.
grpID of the group that the contact belongs to. You can link a contact to several groups at once by specifying their IDs separated by commas.
numThe number of the group for sending messages.
phoneList of phone numbers separated by any separator (add command), or phone number (the move_group , add_black commands). Used for operations with phone numbers in the phones.php script.
mailA list of e-mail addresses separated by any separator (the add command), or an e-mail address (the move_group , add_black commands). Used for operations with e-mail addresses in the mails.php script. The request format is similar to the format for phones.php.
new_phoneA new list of phone numbers separated by any separator (CHG Command).
new_mailNew list of e-mail addresses separated by any separator (CHG Command).
lnmSurname.
fnmID.
mnmMiddle name.
fioContact's FULL NAME. This parameter is used in the get command to get a list of contacts by any of the initials (last name, first name, and / or patronymic).
searchSelecting contacts for the get command by contact name and / or phone number.
after_idContact ID (int_id), starting from which to return the contact list (get command, fmt=3 format), except for the contact list itself. after_id.
bdDate of birth in the format dd.mm.yyyy.
myidThe contact ID assigned by the Client.
cmtCommentary.
tagsTags (tags).
phoOther phone numbers. According to these numbers, SMS messages are not sent out.
typeLock type (add_black commands):
0 – all messages.
1 – mass mailing lists.
2 – single messages.
Or group type (add_group and get_group commands):
0 – group for phone numbers.
1 – group for e-mail addresses.
prev_idThe global identifier of the blacklist item (the id parameter in the Server response), assigned by the Server automatically. Used in the get_black command to request blacklist items added earlier to this item.
cntThe number of records returned in the Server response. The maximum value is 1000.
fmtServer response format:
0 – (default) as a string (ID = 12345).
1 – as a string (12345).
2 – in xml format.
3 – in json format.

Contacts and groups. Server response and error codes

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).
3No records found.
4The IP address is temporarily blocked.
5Operation execution error.
9Attempt to send more than three identical requests for operations with groups, contacts, or blacklist entries 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 creating a contact, contact group, or blacklist entry:
  • when fmt = 0: ID = <id>

  • when fmt = 1: <id>

  • when fmt = 2 (creating a contact, blacklisting entry):
    <phone>
    <id>id</id>
    </phone>

  • when fmt = 2 (creating a group):
    <group>
    <id>id</id>
    </group>

  • when fmt = 3:
    {
    "id": <id>
    }

Where <id><id> is the ID of the contact, group, or blacklist entry assigned by the Server automatically.

When changing or deleting a contact (group), deleting a black list entry:
  • when fmt = 0,1: OK

  • when fmt = 2: <result>OK</result>

  • when fmt = 3:
    {
    "result": "OK"
    }


When requesting a contact list:
  • when fmt = 0:
    phone = <phone>, name = <name>, group = <group>, first_name = <first_name>, last_name = <last_name>, middle_name = <middle_name>, birthday = <birthday>, id = <id>, comments = <comments>, tags = <tags>, phone_other = <phone_other>
    ...

  • when fmt = 1:
    <phone>,<name>,<group>,<first_name>,<last_name>,<middle_name>,<birthday>,<id>,<comments>,<tags>,<phone_other>
    ...

  • when fmt = 2:
    <list>
    <contact>
    <phone>phone</phone>
    <name>name</name>
    <group>group</group>
    <first_name>first_name</first_name>
    <last_name>last_name</last_name>
    <middle_name>middle_name</middle_name>
    <birthday>birthday</birthday>
    <id>id</id>
    <comments>comments</comments>
    <tags>tags</tags>
    <phone_other>phone_other</phone_other>
    </contact>
    ...
    </list>

  • when fmt = 3:
    [{
    "phone": "<phone>",
    "name": "<name>",
    "group": <group>,
    "first_name": "<first_name>",
    "last_name": "<last_name>",
    "middle_name": "<middle_name>",
    "birthday": "<birthday>",
    "id": "<id>",
    "comments": "<comments>",
    "tags": "<tags>",
    "phone_other": "<phone_other>"
    },
    ...]

Where:
<phone> – a list of phone numbers separated by any separator. For e-mail addresses, it is replaced with <mail>.
<name> – contact Name.
<group> – iD of the group that the contact belongs to.
<first_name> – ID.
<last_name> – surname.
<middle_name> – middle name.
<birthday> – date of birth in the format dd.mm.yyyy.
<id> – contact Id assigned by the Client.
<comments> – commentary.
<tags> – tags (tags).
<phone_other><phone_other> – other phone numbers. According to these numbers, messages are not sent out. For e-mail addresses are replaced with <mail_other>.

When requesting a list of groups:
  • when fmt = 0:
    id = <id>, name = <name>, number = <number>, cnt = <cnt>
    ...

  • when fmt = 1:
    <id>,<name>,<number>,<cnt>
    ...

  • when fmt = 2:
    <list>
    <group>
    <id>id</id>
    <name>name</name>
    <number>number</number>
    <cnt>number</cnt>
    </group>
    ...
    </list>

  • when fmt = 3:
    [{
    "id": <id>,
    "name": "<name>",
    "number": <number>,
    "cnt": "<cnt>"
    },
    ...]

Where:
<id> – group ID assigned by the Server when creating the group.
<name> – the name of the group.
<number> – the number of the mailing group.
<cnt> – the number of contacts in the group.

When requesting elements of the "black" list:
  • when fmt = 0:
    id = <id>, phone = <phone>, type = <type>, comment = <comment>
    ...

  • when fmt = 1:
    <id>,<phone>,<type>,<comment>
    ...

  • when fmt = 2:
    <list>
    <record>
    <id>id</id>
    <phone>phone</phone>
    <type>type</type>
    <comment>comment</comment>
    </record>
    ...
    </list>

  • when fmt = 3:
    [{
    "id": <id>,
    "phone": "<phone>",
    "type": <type>,
    "comment": "<comment>"
    },
    ...]

Where:
<id> – iD of the element assigned by the Server when creating.
<phone> – phone number (or <email><email> when requesting an e-mail blacklist).
<type> – blocking type: 0 – all messages, 1 - mass mailings, 2 - single messages.
<comment> – commentary.

Examples of operations with contacts

Examples:

Creating a contact named "Contact" that belongs to a group with ID = 321:

https://smscentre.com/sys/phones.php?add=1&login=alex&psw=123&phone=79999999999&name=Contact&grp=321
Creating a group named " Group":

https://smscentre.com/sys/phones.php?add_group=1&login=alex&psw=123&name=Group
Changing the name of the contact with the phone number "79999999999" to the new name " Contact1":

https://smscentre.com/sys/phones.php?chg=1&login=alex&psw=123&phone=79999999999&name=Contact1
Changing the group name from ID = 321 to the new name " Group1":

https://smscentre.com/sys/phones.php?chg_group=1&login=alex&psw=123&grp=321&name=Group1
Deleting a contact with the phone number " 79999999999":

https://smscentre.com/sys/phones.php?del=1&login=alex&psw=123&phone=79999999999
Deleting a group with ID = 321:

https://smscentre.com/sys/phones.php?del_group=1&login=alex&psw=123&grp=321
Getting a list of contacts belonging to a group with ID = 321:

https://smscentre.com/sys/phones.php?get=1&login=alex&psw=123&grp=321
Getting contact data with the phone number " 79999999999":

https://smscentre.com/sys/phones.php?get=1&login=alex&psw=123&phone=79999999999
Getting a list of all groups:

https://smscentre.com/sys/phones.php?get_group=1&login=alex&psw=123
Adding the phone "79999999999" to the "black" list with blocking only mass mailings:

https://smscentre.com/sys/phones.php?add_black=1&login=alex&psw=123&phone=79999999999&type=1
Removing the phone "79999999999" from the "black" list:

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

The server does not accept more than three identical requests per minute for operations with groups, contacts, or blacklisted entries to reduce the load and protect against errors and loops in the Client-side program.

List of available operations

To create or modify a subclient, you need to call method GET or POST an address indicating the required command and parameters.

Create a subclient: https://smscentre.com/sys/users.php?add=1&login=<login>&psw=<password>&user=<user>&password=<password2>
Change the settings of the subclient: https://smscentre.com/sys/users.php?chg=1&login=<login>&psw=<password>&user=<user>&fio=<fio>
The change in the balance subclient: https://smscentre.com/sys/users.php?pay=1&login=<login>&psw=<password>&user=<user>&sum=<sum>
Obtaining statistics on sub-clients c independent balance: https://smscentre.com/sys/users.php?get_stat=1&login=<login>&psw=<password>&start=<date1>&end=<date2>&reseller=1
Obtaining statistics on one subclient: https://smscentre.com/sys/users.php?get_stat=1&login=<login>&psw=<password>&start=<date1>&end=<date2>&user=<sub_login>
or: https://smscentre.com/sys/users.php?get_stat=1&login=<login>&psw=<password>&start=<date1>&end=<date2>&user_id=<id>
Get detailed statistics on the subclient with independent balance: https://smscentre.com/sys/users.php?get_stat_all=1&login=<login>&psw=<password>&start=<date1>&end=<date2>&reseller=1

Sub-clients. Description of the parameters

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).
userLogin subclient.
pswcCurrent password subclient.
passwordThe new password of the sub-client. The length must be at least 8 characters, and 3 of the conditions must be met: letters, numbers, different case, symbols.
sumThe amount transferred to the client from the main account in the currency of the main account.
balance2Flag that sets the possibility of using the electronic balance for deposits, debits, and receiving statistics on messages.
site_idThe site ID that will own the created subclient.
new_loginNew login subclient when you change.
typeAccount Type.
0 (default) - independent tariff and balance.
1 – main account tariff, independent balance.
2 – tariff and balance of the main account.
3 – main account balance, independent pricing plan.
4 – additional login of the main account.
emailPrimary Email Address.
fl[9]A flag that sets the possibility of sending incoming SMS to e-mail.
email2Alternative email address for sending incoming SMS.
phoneMain phone number.
fl[8]A flag that sets the possibility of sending incoming SMS to the phone.
phone2Alternative phone number for sending incoming SMS.
startThe start date in the period for which statistics are requested. Format: 'dd.mm.yyyy'.
endThe end date in the period. If omitted, data from the start date is returned. Format: 'dd.mm.yyyy'.
user_idThe ID of the subclient that is assigned automatically by the server when creating.
resellerTypes of subclient.
0 or missing – sub-clients using the balance of the main account.
1 – the subclient with independent balance.
hide_deletedTo hide the statistics on the remote subclient.
0 or missing – output statistics for all sub-clients.
1 – to hide the statistics on the remote subclient.
mycurA flag that allows you to display statistics in the currency of the main account.
fioInitials (last name, first name, patronymic) or company name.
propsThe "Other details" field of the sub-client.
cntrContract.
tariffThe current tariff plan. The subclient, you can set data plan is higher tariff plan of the Client. The parameter can take the following values:
0 (default) - 1 tariff (from 1 p.).
1 – 2 tariff (from 1000 to p.).
...
8 – 9 tariff (from 100000 to p.).
mintrfThe minimum fare. Determines the minimum value of the rate subclient regardless of the amount of the payment.
currThe currency of the sub-client's calculations. Used in the add and chg commands. It can take the following basic values:
1 – russian rouble;
2 – uS dollar (USD);
3 – euro;
4 – ukraine hryvnia;
5 – kazakhstan tenge.
tzThe time zone. The Client's time zone is set by default. Possible values:
0 – GMT-12.
...
12 – GMT+00
...
24 – GMT+12.
senderDefault Sender name (Sender ID) .
sender2Sender's Backup name.
fl[29]A flag that determines whether the Client's list of senders can be used (main Account).
fl2[9]A flag that allows the use of more expensive routes for guaranteed message delivery.
fl2[24]A flag that allows you to send first via cheap routes, and repeat through expensive ones if not delivered (except for mass messaging).
fl2[12]The flag prohibits sending messages with automatic replacement of the sender's name.
fl2[13] The flag disables adding the sender's name to the message text without increasing the cost in case of autocorrect.
nbBalance for notifications. Upon reaching the specified amount will be sent a notification e-mail subclient.
ktmThis parameter sets the number of days for storing sent messages, after which SMS messages will be automatically deleted from the history.
fmtsA list of phone codes that you can send messages to.
notesComments the main account. Not available for the subclient.
fl2[23]Prohibition of mass and advertising mailings.
fl[26]Permission to use the contact list of the main account.
fl2[8]The flag that sets the advanced mode of the personal account.
fl[16]Enable answering machine recognition when making calls.
fl2[31]Allow the use of master account templates.
Additional parameters for configuring access to the service
fl3[20]Flag that allows you to disable confirmation of access from new IP addresses when logging in.
phA comma-separated list of phone numbers or group numbers for sending SMS messages.
fl[27]Prevent changes to the settings of the subclient.
fl[28]Prohibit subaccount payments.
fl[6]Prohibit mailing lists.
fl2[1]To hide messages for subclient.
fl2[10]Block a subaccount.
Additional parameters for limits and restrictions
dlimThe total SMS limit per day. Defines the maximum number of messages sent per day.
plimThe limit for one number. Sets the maximum number of messages sent per day to one phone number.
tlimThe limit on the number and text. Sets the maximum number of messages sent per day with one text per phone number.
ilimThe limit per IP address. Sets the maximum number of messages sent per day from a single IP address.
tmlimThe time range in hours h1-h2 in which messages are allowed to be sent. If the current time is less than h1, then an SMS message will be sent to the subscriber when the time h1 arrives, if the current time falls within the range from h1 to h2, then the message will be sent immediately, in another case, the sending will be performed the next day when the time h1 is reached. This function, for example, is useful in order to prevent subscribers from receiving SMS messages at night.
fl2[15]Prevent sending at a time other than the one specified in the tmlim parameter, instead of rescheduling to the next day.
fl2[16]When using the tmlim parameter, consider the subscribers ' time zone.
vldThe maximum delivery time of messages to temporarily unavailable subscribers (min.).
Additional parameters for autoresponders
answAuto-reply to incoming SMS messages.
answ_callAuto-reply to incoming calls.
fl2[4]Disable call forwarding (by e-mail, phone and handler).
Additional parameters for API settings
urlhttp address (URL) of the script to handle delivery status of SMS messages and (or) incoming SMS messages on the side of the subclient. The specified script will be invoked by the Server after each receiving a delivery status of a previously submitted a subclient SMS messages and (or) of receiving an incoming SMS message from the subscriber.
fl[10]Enabling forwarding of message statuses to the http address specified in the url parameter.
fl[11]Enabling forwarding of incoming SMS messages to the http address set in the url parameter.
fl[2]Enable SMPP access (you must first register an IP address through ONLINE support).
fl[1]Transfer incoming SMSes via SMPP connection.
fl[23]Track the status of certain SMS parts.
fl2[27]Test mode (virtual sending without payment).
fl[5]Enable control over the delivery of messages.
fl[30]Enabling the API log. Allows you to view the 20 of recent http requests. Stored 10 minutes after the last request.
Additional parameters for E-mail2sms
mfl[0]Flag that allows you to disable the e-mail2sms function.
mphComma-separated list of phone numbers to which messages will be sent.
mfl[5]Enables the ability to specify a list of phone numbers in the body of the letter.
mfl[6]Enables the ability to specify a list of phone numbers in the email address.
mfl[1]Forwarding an email without a subject.
mfl[2]Forwarding a message without text.
mfl[3]Forwarding a message without a return address (from whom).
mfl[4]Translating the text of the letter into transliteration.
mh1The initial value of the time range for sending incoming emails. Together with the mh2 parameter, it defines the range within which incoming messages can be forwarded as SMS messages..
mh2The final value of the time range for sending incoming emails.
mlenThe maximum message length to which an incoming message is truncated when sent as an SMS message (a number greater than 12 specifies the maximum length of a message,a number less than 12 - the number of SMSes).

Server response and error codes

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).
3No records found.
4The IP address is temporarily blocked.
5Operation execution error.
6The subclient with the specified login does not exist.
7A sublogin that shares a balance with the main account is specified, or the balance2=1 parameter is not specified in the request for an operation with an electronic balance.
8Error when saving a record.
9Attempt to send more than three requests to add a subclient or change something in that subclient within minutes.
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).
10Insufficient funds for crediting.

If the request is successful, the Server returns a response in the form of a string.

When you create a subclient:
  • when fmt = 0: ID = <id>

  • when fmt = 1: <id>

  • when fmt = 2:
    <user
    <id>id</id>
    </user>

  • when fmt = 3:
    {
    "id": <id>
    }

Where <id><id> is the sub-client ID assigned by the Server automatically.

When changing the sublogin:
  • when fmt = 0,1: OK

  • when fmt = 2:
    <result>OK</result>

  • when fmt = 3:
    {
    "result": "OK"
    }


When requesting statistics:
  • with fmt = 0 and get_stat = 1:
    login = <login>, sms = <cnt>, credit = <credit>, debit = <debit>, currency = <currency>
    ...

  • with fmt = 0 and get_stat_all = 1:
    login = <login>, description = <description>, operator = <operator>, mccmnc = <mccmnc>, sms = <cnt>, credit = <credit>, debit = <debit>, currency = <currency>
    ...

  • with fmt = 1 and get_stat = 1:
    <login>,<cnt>,<credit>,<debit>,<currency>
    ...

  • with fmt = 1 and get_stat_all = 1:
    <login>,<description>,<operator>,<mccmnc>,<cnt>,<credit>,<debit>,<currency>
    ...

  • with fmt = 2 and get_stat = 1:
    <list>
    <stat>
    <login>login</login>
    <sms>cnt</sms>
    <credit>credit</credit>
    <debit>debit</debit>
    <currency>currency</currency>
    </stat>
    ...
    </list>

  • with fmt = 2 and get_stat_all = 1:
    <list>
    <user login="login">
    <item>
    <description>description</description>
    <operator>operator</operator>
    <mccmnc>mccmnc</mccmnc>
    <sms>cnt</sms>
    <credit>credit</credit>
    <debit>debit</debit>
    <currency>currency</currency>
    </item>
    ...
    </user>
    ...
    </list>

  • with fmt = 3 and get_stat = 1:
    [{
    "login": "<login>",
    "sms": "<cnt>",
    "credit": "<credit>",
    "debit": "<debit>",
    "currency": "<currency>"
    },
    ...]

  • with fmt = 3 and get_stat_all = 1:
    [{
    "login": "<login>",
    "items": [{
    "description": "<description>",
    "operator": "<operator>",
    "mccmnc": "<mccmnc>",
    "sms": "<cnt>",
    "credit": "<credit>",
    "debit": "<debit>",
    "currency": "<currency>"
    },
    ...]
    },
    ...]

Where:
<login> - login subclient.
<description> - operation name.
<operator> - operator name.
<mccmnc><mccmnc> - numeric code of the subscriber's country plus numeric code of the subscriber's operator
<cnt><cnt> - number of messages.
<credit> - debit.
<debit> - credit.
<currency> - the three-character currency code subclient.

Examples of actions with sub-clients

Examples:

Creating a sub-client with the login "mylogin", password "mypassword", phone number 79999999999 and permission to use sender names (Sender ID) of the main account:

https://smscentre.com/sys/users.php?add=1&login=alex&psw=123&user=mylogin&password=mypassword&phone=79999999999&fl[29]=1
Changing the sub-client's login from "mylogin" to "mylogin2", client type to "Tariff and balance of the main account" and setting allowed codes for sending SMS only in Russia:

https://smscentre.com/sys/users.php?chg=1&login=alex&psw=123&user=mylogin&password=mypassword&new_login=mylogin2&type=2&fmts=7,-77
Getting statistics on sub-clients who have a shared balance with the main account and SMS sent from the electronic balance:

https://smscentre.com/sys/users.php?get_stat=1&login=alex&psw=123&balance2=1
Getting statistics on a sub-client with the username "sub_alex":

https://smscentre.com/sys/users.php?get_stat=1&login=alex&psw=123&user=sub_alex
Getting statistics on independent sub-clients in the currency of the main account from "01.01.2014" to "01.02.2014":

https://smscentre.com/sys/users.php?get_stat=1&login=alex&psw=123&mycur=1&start=01.01.2014&end=01.02.2014

The server does not accept more than three requests within a minute to add a subclient or change the same subclient to reduce the load and protect against bugs and loops in the program on the Client side.

Creating and uploading invoices and reports

To create a new account for a subclient, you need to call method GET or POST address: https://smscentre.com/sys/documents.php?add_account=1&login=<login>&psw=<password>&user=<user>&sum=<sum> or: https://smscentre.com/sys/documents.php?add_account=1&login=<login>&psw=<password>&user_id=<user_id>&sum=<sum>
To upload an existing account subclient, you need to call method GET or POST address: https://smscentre.com/sys/documents.php?get_account=1&login=<login>&psw=<password>&user=<user>&id=<id> or: https://smscentre.com/sys/documents.php?get_account=1&login=<login>&psw=<password>&user_id=<user_id>&id=<id>
To upload an existing sub-client report, call the GET or POST address method: https://smscentre.com/sys/documents.php?get_act=1&login=<login>&psw=<password>&user=<user>&id=<id> https://smscentre.com/sys/documents.php?get_act=1&login=<login>&psw=<password>&user_id=<user_id>&id=<id> or: https://smscentre.com/sys/documents.php?get_act=1&login=<login>&psw=<password>&user=<user>&num=<num> https://smscentre.com/sys/documents.php?get_act=1&login=<login>&psw=<password>&user_id=<user_id>&num=<num>
The following parameters are 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).
userThe username of the sub-client to create or upload an invoice for. You can use the user_id parameter instead of this parameter.
user_idID of the sub-client to create or upload an invoice for. You can use the user parameter instead of this parameter.
sumThe amount to create an account for in the Client's currency.
serviceName of the service specified when creating the invoice.
idID of the requested invoice or act.
numNumber of the requested act.

If an error occurs, the Server returns the following string:
    {
    "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.
5Account creation error.
6Sublogin was not found.
7The specified document was not found.
9Attempt to send more than one request to create or receive an invoice or report 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).

In case of a successful request to create an invoice, the Server returns a multipart structure that includes 2 parts with the corresponding headers. The first part contains the Server response in json format, containing the ID and amount of the created invoice, the second part includes a file with the invoice in pdf format.

If the invoice request is successful, the Server returns the invoice file in pdf format..

In case of a successful request to receive the act, the Server returns a file with the act in pdf format.

The server does not accept more than one request to create or change an invoice or act within a minute to reduce the load and protect against errors and loops in the Client-side program.

List of available operations with sender names

To manage the names of senders, you must call the appropriate address using the GET or POST method, specifying the required command and parameters.

To get a list of senders ' names registered in your personal account and approved by the moderator: https://smscentre.com/sys/senders.php?get=1&login=<login>&psw=<password>
To add a new sender name: https://smscentre.com/sys/senders.php?add=1&login=<login>&psw=<password>&sender=<sender>&cmt=<cmt>
To change the sender's name: https://smscentre.com/sys/senders.php?chg=1&login=<login>&psw=<password>&sender=<sender>&cmt=<cmt> or https://smscentre.com/sys/senders.php?chg=1&login=<login>&psw=<password>&id=<id>&cmt=<cmt>
Sending a confirmation code for the sender's digital name: https://smscentre.com/sys/senders.php?send_code=1&login=<login>&psw=<password>&sender=<sender>
Confirmation of the sender's digital name: https://smscentre.com/sys/senders.php?check_code=1&login=<login>&psw=<password>&sender=<sender>&code=<code>
To delete the sender's name: https://smscentre.com/sys/senders.php?del=1&login=<login>&psw=<password>&sender=<sender> or https://smscentre.com/sys/senders.php?del=1&login=<login>&psw=<password>&id=<id>
When adding or changing the sender's name in the request body, you can transfer a document file for operators (trademark certificate, domain certificate) in jpg, tif, pdf, png, zip, rar format. The maximum size of the transferred file should not exceed 3 MB. A comment on the document can be specified in the additional doc_info parameter.

Description of parameters

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).
all0 (default) - get a list of activated sender names.
1 – get a complete list of sender names.
senderThe sender name that is being created or deleted.
mts_step1 – register a paid name with the MTS operator.
sber_step1 – register a free name with a Sberbank Mobile operator.
tele21 – register a name with the Tele2 operator at the tariff with free names.
motiv1 – register a name with the MOTIF operator according to the tariff with free names.
mega_step1 – register a paid name with the Megafon operator.
bee_step1 – register a paid name with the Beeline operator.
motiv_step1 – register a paid name with the MOTIV operator.
winmob_step1 – register a paid name with the Win-Mobile operator.
volnamob_step1 – register a paid name with the Wave mobile operator.
tele2_step1 – register a paid name with a Tele2 operator.
ua_reg1 – to register a name for Ukraine at a reduced rate of national traffic.
For this tariff, you must additionally pass the following parameters:
fio – Legal name of the organization (LLC/SPD).
inn – EDRPOU/INN.
site – Website address or link to a social network.
email – E-mail for communication.
address – Actual address.
desc – Description of the services provided by the sender.
subj – Subject (purpose of informing).
ua_int1 – register a name for Ukraine at a higher rate for international traffic. To register, you also need to additionally pass the fields described above for the ua_reg parameter.
by_reg1 – register a name for Belarus for a reduced national traffic tariff.
For this tariff, you must additionally pass the following parameters:
by_fio – Company Name.
by_inn – UNP / INN.
by_address – Company address.
by_ocup is the field of activity (options can be specified on this page). Numbering from 1 to 19.
by_type – The type of mailing list (options can be specified on this page). Numbering from 1 to 3.
by_mes – Sample message.
by_site – Site address.
by_int1 – register a name for Belarus at a higher rate for international traffic. To register, you also need to additionally pass the fields described above for the by_reg parameter.
idID of the sender's name, assigned by the Server automatically when creating a new name.
cmtComment specified when creating the sender name.
mail1 – add the sender's e-mail address.
nameA comment related to the mail parameter (usually the name of the owner of the e-mail address).
codeCode for confirming the sender's digital name.
siteThe address of the site from which the codes will be sent to confirm the digital names of the senders. This parameter must have been previously added and activated as Sender ID. If omitted, messages will be sent as the sender by default.
site_nameThe site address specified in the text of the message with the confirmation code.
userThe user ID of the subclient to which you apply the specified command.
operators1 – add the status code of the sender's name from the operator to the response.
from_dateSelect the names of senders starting from the specified date, for which the name status of any of the operators has been changed. When this parameter is specified, the names are sorted in descending order of the date when the name statuses were changed. DD.MM.YYYY format.
prev_idA unique identifier of the sender's name that is assigned by the Server automatically when the name is created. Used to request a list of names created before the name with the specified ID.
cntThe number of sender names returned when requesting a list of names. The maximum value is 15000.
doc_infoIf a document file for operators is passed in the request body when creating or changing the sender's name, then you can specify a description for the passed file in this parameter.
charsetEncoding of transmitted parameters.
files1 – return in the server response for the get command an array of files containing information about attached document files for operators. This parameter is relevant only for fmt=2 or fmt=3 formats.
The array includes the following fields:
file – File name.
fid – ID of the file in the system.
fstatus – File status (0 - under review, 1 - rejected, 2 - approved).
fcomment – Administrator's comment.

Server response and error codes

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).
3Sender name not found.
4The IP address is temporarily blocked.
5Error saving or deleting the sender's name.
7Invalid number format.
8The confirmation code cannot be delivered to the specified number.
9Attempt to send more than three identical requests to get a list of available sender names or five requests to create a new sender name 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).
10The code has already been sent to the specified number. Retry is possible after 8 hours.
11Invalid confirmation code.

If the request is successful, the Server returns a response in the form of a string.

When requesting a list of sender names:
  • with fmt = 0 and all = 0:
    name = <sender>, id = <id>
    ...

  • with fmt = 1 and all = 0:
    <sender>,<id>
    ...

  • with fmt = 2 and all = 0:
    <list>
    <sender id="<id>">sender</sender>
    ...
    </list>

  • with fmt = 3 and all = 0:
    [{
    "sender": "<sender>",
    "id": <id>
    },
    ...]

  • with fmt = 0 and all = 1:
    name = <sender>, status = <status>, id = <id>
    ...

  • with fmt = 1 and all = 1:
    <sender>,<status>,<id>
    ...

  • with fmt = 2 and all = 1:
    <list>
    <sender status="<status>" id="<id>">sender</sender>
    ...
    </list>

  • with fmt = 3 and all = 1:
    [{
    "sender": "<sender>",
    "status": <status>,
    "id": <id>
    },
    ...]

  • with fmt = 0 and operators = 1:
    name = <sender>, mega_step = <mega_step_status>, bee_step = <bee_step_status>, motiv_step = <motiv_step_status>, sber_step = <sber_step_status>, winmob_step = <winmob_step>, volnamob_step = <volnamob_step>, mts_step = <mts_step_status>, tele2_step = <tele2_step_status>, tele2 = <tele2_status>, ua_reg = <ua_reg_status>, ua_int = <ua_int_status>, mega_int = <mega_int_status>, motiv_int = <motiv_int_status>, mts_int = <mts_int_status>, motiv = <motiv_status>, by_reg = <by_reg_status>, by_int = <by_int_status>, tele2_int = <tele2_int_status>, sber_int = <sber_int_status>, id = <id>
    ...

  • with fmt = 2 and operators = 1:
    <list>
    <sender mega_step="<mega_step_status>" bee_step="<bee_step_status>" motiv_step="<motiv_step_status>" sber_step="<sber_step_status>" winmob_step="<winmob_step_status>" volnamob_step="<volnamob_step_status>" mts_step="<mts_step_status>" tele2_step="<tele2_step_status>" tele2="<tele2_status>" ua_reg="<ua_reg_status>" ua_int="<ua_int_status>" mega_int="<mega_int_status>" motiv_int="<motiv_int_status>" mts_int="<mts_int_status>" motiv="<motiv_status>" by_reg="<by_reg_status>" by_int="<by_int_status>" tele2_int="<tele2_int_status>" sber_int="<sber_int_status>" id="<id>">sender</sender>
    ...
    </list>

  • with fmt = 3 and operators = 1:
    [{
    "sender": "<sender>",
    "mega_step": "<mega_step_status>",
    "mega_int": "<mega_int_status>",
    "bee_step": "<bee_step_status>",
    "motiv": "<motiv_status>",
    "motiv_step": "<motiv_step_status>",
    "motiv_int": "<motiv_int_status>",
    "sber_step": "<sber_step_status>",
    "sber_int": "<sber_int_status>",
    "winmob_step": "<winmob_step_status>",
    "volnamob_step": "<volnamob_step_status>",
    "mts_step": "<mts_step_status>",
    "mts_int": "<mts_int_status>",
    "tele2_step": "<tele2_step_status>",
    "tele2": "<tele2_status>",
    "tele2_int": "<tele2_int_status>",
    "ua_reg": "<ua_reg_status>",
    "ua_int": "<ua_int_status>",
    "by_reg": "<by_reg_status>",
    "by_int": "<by_int_status>",
    "id": "<id>"
    },
    ...]

Where:
<sender> – registered and approved sender name.
<mega_step_status>, <mega_int_status>, <bee_step_status>, <motiv_status>, <motiv_step_status>, <motiv_int_status>, <sber_step_status>, <sber_int_status>, <winmob_step_status>, <volnamob_step_status>, <mts_step_status>, <mts_int_status>, <tele2_step_status>, <tele2_status>, <tele2_int_status>, <ua_reg_status>, <ua_int_status>, <by_reg_status>, <by_int_status> – the status code of the sender's name from the corresponding operator (0 - pending registration, 1 - sent for registration, 2 - allowed by the operator, 3 - not accepted by the operator, 4 - temporarily disabled, 5 - insufficient funds in the account, 8 - supporting documents are required, 9 - activation from the beginning of the month), 255 - allowed, but marked for de-registration).
<status> – sender Name status (0-waiting for moderation, 1-allowed to use, 2-disabled).
<id> – unique identifier of the sender's name (assigned by the Server automatically when creating a name).

If the sender's name has a replacement analog for any operator, then with operators = 1 and fmt = 0,2,3, this replacement will be additionally included in the server response.

When adding a new sender name:
  • when fmt = 0: ID = <id>

  • when fmt = 1: <id>

  • when fmt = 2:
    <sender>
    <id>id</id>
    </sender>

  • when fmt = 3:
    {
    "sender": <id>
    }

Where:
<id> – the sender name ID assigned by the Server automatically.

When changing the sender's name, sending the code, confirming and deleting the sender's name:
  • when fmt = 0, 1: OK

  • when fmt = 2:
    <result>OK</result>

  • when fmt = 3:
    {
    "result": "OK"
    }


Examples of actions with sender names

Examples:

Getting a list of sender names:

https://smscentre.com/sys/senders.php?get=1&login=alex&psw=123
Adding a new sender name:

https://smscentre.com/sys/senders.php?add=1&login=alex&psw=123&sender=my_shop&cmt=test
Sending a confirmation code for the sender's digital name:

https://smscentre.com/sys/senders.php?send_code=1&login=alex&psw=123&sender=79999999999
Sending confirmation code to the digital sender name for subclient "subalex" on behalf of "mysite.ru":

https://smscentre.com/sys/senders.php?send_code=1&login=alex&psw=123&sender=79999999999&user=subalex&site=mysite.ru
Confirmation of the sender's digital name:

https://smscentre.com/sys/senders.php?check_code=1&login=alex&psw=123&sender=79999999999&code=338824
Deleting the sender's name:

https://smscentre.com/sys/senders.php?del=1&login=alex&psw=123&sender=my_shop

The server does not accept more than three identical requests within a minute to get a list of available sender names and five requests to create a new sender name to reduce the load and protect against errors and loops in the Client-side program.

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

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).
apikeyA special API key used for simplified authorization instead of the "login+password" pair (you can create 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.

Getting statistics

To get the statistics of sent messages, you need to call the address by the GET or POST method: https://smscentre.com/sys/get.php?get_stat=1&login=<login>&psw=<password>&start=<date1>&end=<date2>
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 statistics are requested. Format: 'dd.mm.yyyy'.
endThe end date in the period. If omitted, data from the start date is returned. Format: 'dd.mm.yyyy'.
mycurFlag that allows you to display statistics in the current currency of the Client.
balance2Flag that allows you to get statistics on sent messages paid with an electronic balance.

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:
    login = <login>, sms = <cnt>, credit = <credit>, debit = <debit>, currency = <currency>
    ...

  • when fmt = 1:
    <login>,<cnt>,<credit>,<debit>,<currency>
    ...

  • when fmt = 2:
    <list>
    <stat>
    <login>login</login>
    <sms>cnt</sms>
    <credit>credit</credit>
    <debit>debit</debit>
    <currency>currency</currency>
    </stat>
    ...
    </list>

  • when fmt = 3:
    [{
    "login": "<login>",
    "sms": "<cnt>",
    "credit": "<credit>",
    "debit": "<debit>",
    "currency": "<currency>"
    },
    ...]

Where:
<login> - customer Login.
<cnt> - number of messages.
<credit> - debit.
<debit> - credit.
<currency> - three-character currency code.

Examples:

Getting statistics in the Client's current currency from " 01.01.2014 " to "01.02.2014" on a non-cash balance:

https://smscentre.com/sys/get.php?get_stat=1&login=alex&psw=123&mycur=1&start=01.01.2014&end=01.02.2014

The server does not accept more than three requests per minute to get statistics to reduce the load and protect against errors and loops in the Client-side program.

Request for rates

To get the list of tariffs for the specified Client, call the GET or POST address method: https://smscentre.com/sys/get.php?get_price=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).

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 for a list of fares 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 the response as a set of strings:
  • when fmt = 0:
    zone = <zone>, name = <name>, api = <api>, mass = <mass>, mms = <mms>, hlr = <hlr>, call = <call>
    ...

    if there are set individual tariffs for certain operators, a set of lines is added to the response:
    mccmnc = <mccmnc>, cost = <cost>
    ...

    mail = <mail>

  • when fmt = 1:
    <zone>,<name>,<api>,<mass>,<mms>,<hlr>,<call>
    ...

    <mccmnc>,<cost>
    ...

    <mail>

  • when fmt = 2:
    <price>
    <zones>
    <zone name="<name>" api="<api>" mass="<mass>" mms="<mms>" hlr="<hlr>" call="<call>">zone</zone>
    ...
    </zones>
    <codes>
    <mccmnc cost="<cost>">mccmnc</mccmnc>
    ...
    </codes>
    <mail>mail</mail>
    </price>

  • when fmt = 3:
    {
    "zones": [{
    "zone": "<zone>",
    "name": "<name>",
    "api": "<api>",
    "mass": "<mass>",
    "mms": "<mms>",
    "hlr": "<hlr>",
    "call": "<call>"
    },
    ...
    {
    ...
    }],
    "codes": [{
    "mccmnc": "<mccmnc>",
    "cost": "<cost>"
    },
    ...
    {
    ...
    }],
    "mail": "<mail>"
    }

Where:
<zone> - tariff zone.
<name> - name of the tariff zone (operator, country, etc..).
<api> - the cost of SMS when sending via the API.
<mass> - the cost of SMS when sending via your personal account.
<mms> - the cost of an MMS message.
<hlr> - the cost of an HLR request.
<call> - the cost of a voice message (call).
<mccmnc> - the country code and the mobile operator for which the individual tariff is set.
<cost> - the cost of the message for this individual tariff.
<mail> - cost of an e-mail message.

Examples:

Getting a list of fares:

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

The server does not accept more than three identical requests within a minute to receive a list of tariffs to reduce the load and protect against errors and loops in the Client-side program.

Getting information about the operator

To get information about the subscriber's operator (except for the ported numbers), you must use the GET or POST method to call the address: https://smscentre.com/sys/info.php?get_operator=1&login=<login>&psw=<password>&phone=<phone>
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).
phoneThe subscriber's phone number or a comma-separated list of numbers.

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).
3Operator not found.
4The IP address is temporarily blocked.
9Attempt to send more than three identical requests or any 100 requests for information about the subscriber's operator 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 or a list of strings for multiple requests. (in this case, the answer is The "phone" parameter is added to the server"):

  • when fmt = 0: country = <country>, operator = <operator>, region = <region>, mcc = <mcc>, mnc = <mnc>, tz = <tz>

  • when fmt = 1: <country>,<operator>,<region>,<mcc>,<mnc>,<tz>

  • when fmt = 2:
    <info>
    <country>country</country>
    <operator>operator</operator>
    <region>region</region>
    <mcc>mcc</mcc>
    <mnc>mnc</mnc>
    <tz>tz</tz>
    </info>

    For multiple requests, the <info><info> constructs are enclosed in the <list>tag.

  • when fmt = 3:
    {
    "country": "<country>",
    "operator": "<operator>",
    "region": "<region>",
    "mcc": "<mcc>",
    "mnc": "<mnc>",
    "tz": "<tz>"
    }

Where:
<phone> – subscriber's phone number.
<country> – name of the country of registration of the subscriber number.
<operator> – mobile operator of the subscriber.
<region> – region of registration of the subscriber number.
<mcc> – numeric code of the subscriber's country.
<mnc> – numeric code of the subscriber's operator.
<tz> – time zone of the subscriber number registration region.


Example:

Getting information about the subscriber's operator with the number " 79999999999":

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

The server does not accept more than three identical requests within a minute to receive information about the subscriber's operator to reduce the load and protect against errors and loops in the Client-side program.

The server also blocks sending more than 100 requests per minute to receive operator data to reduce the load on the database.

Getting data about a short link

To get information about a short link, call the GET or POST address method: https://smscentre.com/sys/tinyurls.php?get=1&login=<login>&psw=<password>&link=<link>
or https://smscentre.com/sys/tinyurls.php?get=1&login=<login>&psw=<password>&id=<id>
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).
linkOriginal full Link.
idID of the short link. Assigned automatically when created.

All parameters that contain special characters (plus, space, Cyrillic characters, etc.) must be encoded using the urlencode function for transmission in an HTTP request.


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).
3Link not found.
4The IP address is temporarily blocked.
9Attempt to send more than three identical requests for short link information 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>, cnt = <cnt>, cnt_mon = <cnt_mon>, cnt_day = <cnt_day>, cnt_yes = <cnt_yes>, cnt_pmon = <cnt_pmon>, link = <link>

  • when fmt = 1: <id>,<cnt>,<cnt_mon>,<cnt_day>,<cnt_yes>,<cnt_pmon>,<link>

  • when fmt = 2:
    <result>
    <id>id</id>
    <cnt>cnt</cnt>
    <cnt_mon>cnt_mon</cnt_mon>
    <cnt_day>cnt_day</cnt_day>
    <cnt_yes>cnt_yes</cnt_yes>
    <cnt_pmon>cnt_pmon</cnt_pmon>
    <link>link</link>
    </result>

  • when fmt = 3:
    {
    "id": "<id>",
    "cnt": "<cnt>",
    "cnt_mon": "<cnt_mon>",
    "cnt_day": "<cnt_day>",
    "cnt_yes": "<cnt_yes>",
    "cnt_pmon": "<cnt_pmon>",
    "link": "<link>"
    }

Where:
<id> – iD of the short link.
<cnt> – the number of all clicks on a short link.
<cnt_mon> – number of clicks on a short link per month.
<cnt_day> – number of clicks on a short link for today.
<cnt_yes> – the number of clicks on the short link for yesterday.
<cnt_pmon> – number of clicks on a short link in the previous month.
<link> – short link.


Example:

Getting information about a short link with id= " 145142":

https://smscentre.com/sys/tinyurls.php?get=1&login=alex&psw=123&id=145142
Getting information about the short link from the full source link " mywebsite.ru":

https://smscentre.com/sys/tinyurls.php?get=1&login=alex&psw=123&link=mywebsite.ru

The server does not accept more than three identical requests within a minute to get information about a short link to reduce the load and protect against errors and loops in the Client-side program.

Connecting dedicated numbers for receiving messages

You can use special API commands to get a list of available dedicated numbers for receiving SMS messages and connect any number to your username, paying the cost for the remaining days in the current month. When you connect a dedicated number, you automatically agree to the terms of use of such numbers.

To get a list of available allocated numbers, call the following address using the GET or POST method: https://smscentre.com/sys/receive_phones.php?get=1&login=<login>&psw=<password>
To connect a dedicated number, you need to call the address using the GET or POST method: https://smscentre.com/sys/receive_phones.php?buy=1&login=<login>&psw=<password>&phone=<phone>
To change the attribute of the extension of the allocated number for the next month, you must call the address by the GET or POST method: https://smscentre.com/sys/receive_phones.php?chg=1&login=<login>&psw=<password>&phone=<phone>&noprolong=<noprolong>
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).
phonePlug-in number.
noprolongIndicates whether the allocated number is extended for the next month. This parameter can also be specified when connecting the number in the buy command.
0 (default) - enable automatic number renewal.
1 – disable automatic number renewal.

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).
3There are not enough funds in the account to rent a room.
4The IP address is temporarily blocked.
9Attempt to send more than two identical requests to get a list of available phone numbers for rent, or to connect a number, or to change the properties of a dedicated number 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.

To get a list of available numbers:
  • when fmt = 0:
    phone = <phone>, type = <type>, cost = <cost>, current_cost = <current_cost>, info = <info>
    ...

  • when fmt = 1:
    <phone>,<type>,<cost>,<current_cost>,<info>
    ...

  • when fmt = 2:
    <list>
    <receive_phone>
    <phone>phone</phone>
    <type>type</type>
    <cost>cost</cost>
    <current_cost>current_cost</current_cost>
    <info>info</info>
    </receive_phone>
    ...
    </list>

  • when fmt = 3:
    [{
    "phone": "<phone>",
    "type": <type>,
    "cost": "<cost>",
    "current_cost": "<current_cost>"
    "info": "<info>"
    },
    ...]

Where:
<phone> – phone number.
<type> – number type: 1,4-dedicated virtual number, 2-number on the SIM hosting service.
<cost> – the cost of renting a phone number for a full month.
<current_cost> – the cost of renting a phone number for the remaining days until the end of the current month.
<info> – operator name and supported notification types.

To rent a room:
  • when fmt = 0: cost = <cost>

  • when fmt = 1: <cost>

  • when fmt = 2:
    <phone>
    <cost>cost</cost>
    </phone>

  • when fmt = 3:
    {
    "cost": "<cost>"
    }

Where:
<cost> – the amount debited from the Client's account for the rental of the phone number.

To change the extension attribute of the number:
  • when fmt = 0,1: OK

  • when fmt = 2:
    <result>OK</result>

  • when fmt = 3:
    {
    "result": "OK"
    }



Examples:

Getting a list of available phone numbers for rent:

https://smscentre.com/sys/receive_phones.php?get=1&login=alex&psw=123
Connecting the number " 79999999999":

https://smscentre.com/sys/receive_phones.php?buy=1&login=alex&psw=123&phone=79999999999
Disabling the ability to extend the allocated number "79999999999" for the next month:

https://smscentre.com/sys/receive_phones.php?chg=1&login=alex&psw=123&phone=79999999999&noprolong=1

The server does not accept more than two identical requests within a minute to get a list of available numbers for rent or to connect a number, or to change the properties of the allocated number to reduce the load and protect against errors and loops in the Client-side program.

Transmitting statuses and messages to the Client handler

In the Client's personal account in "User settings" it is possible to specify the http (s) address (URL) of the script for processing the delivery statuses of messages, incoming SMS messages, as well as service messages (when using the service "Confirm the number with a call") on the Client side. The specified script will be called by the Server after each receipt of the delivery status of a message previously sent by the Client, after receiving an incoming SMS message from the subscriber or a call from the subscriber (when using the "Number Confirmation by Call" service").

In the address of the handler, you can specify the charset parameter to select the encoding of the transmitted parameters: ?charset=utf-8
?charset=koi8-r
?charset=windows-1251
The default encoding is windows-1251.

Also, in the address of the status handler and incoming messages, you can pass the fmt parameter to specify the format of the returned parameters. Possible values: fmt=2 (for xml format) and fmt=3 (for json format). When transmitting the fmt parameter, the koi8-r encoding is not used.

To protect the transmitted data from spoofing , you can additionally specify any of the md5, sha1, or crc32 parameters in the handler address that define the algorithm for calculating the control parameter with the string hash:
"id:phone:status:<ñåêðåòíàÿ ñòðîêà>" − for the delivery status
"phone:mes:to:<ñåêðåòíàÿ ñòðîêà>" − for an incoming message
"phone:ts:<ñåêðåòíàÿ ñòðîêà>" − to confirm the number with a call
in the form of:
?md5=<ñåêðåòíàÿ ñòðîêà>
?sha1=<ñåêðåòíàÿ ñòðîêà>
?crc32=<ñåêðåòíàÿ ñòðîêà>
You can use Latin letters, numbers, minus signs, and underscores as secret string characters. The corresponding parameter will be passed to the handler, in which the secret string will be replaced with the hash value of the transmitted data.

All parameters are passed by the POST method (for fmt=2 and fmt=3, the parameters are passed in the request body). If it is necessary to transfer the parameters specified in the handler URL by the GET method, you need to register them in a special way through the "!" symbol (for example, in the URL "https://mysite.ru/!param1&param2?param3&param4" parameters param1 and param2 will be transmitted by the GET method, and param3 and param4 by the POST method).

Transmitted parameters for the SMS message status:

OptionThe value
idMessage ID.
phonePhone number.
statusMessage status.
timeTime of status change (or delivery of an SMS message to the subscriber).
Format: DD.MM.YY hh: mm: ss (by the time zone specified in the settings).
tsTime to change the status in the form of a stamp in seconds.
errError code if the message cannot be delivered (list). Passed if not equal to zero.
syserrAdditional error from the operator, not always present.
cntThe number of parts (when sending an SMS message) or the number of seconds (when sending a voice message (call)).
typeMessage type (0 – SMS, 1 – Flash-SMS, 2 – Binary SMS, 3 – Wap-push, 4 – HLR-request, 5 – Ping-SMS, 6 – MMS, 7 – Call, 10 – Viber, 12 – Social Networks).
costMessage cost.
flagA flag in the form of a 2-byte number containing various information about the message. Combinations of bit values of different characteristics are possible.

0-3 bits (message type):
0 (by default) – SMS.
1 – Flash-SMS.
2 – Binary SMS.
3 – Wap-push.
4 – HLR-query.
5 – Ping-SMS.
6 – MMS.
7 – Call.
8 – E-mail.
10 – Viber.
12 – Social network.


Bit 5 – payment of the message from the second balance.
Bit 8 - indicates a template message.

Bits 10,9 are the type of template message:
00 - service.
01 - transactional.
10 - authorization.
11 - advertising.
senderThe sender's name displayed on the recipient's phone.
dtmfThe sequence of characters typed by the subscriber on the numeric keypad while listening to a voice message (phone call).
cmtThe client's comments transmitted when sending the message. If overtime occurs during a voice message, it will be passed in a separate line in the comments in the form of "overtime: mm:ss".
md5MD5-õåø ñòðîêè "id:phone:status:<ñåêðåòíàÿ ñòðîêà>". Passed if it was specified as an additional parameter in the http (s) address of the handler.
sha1sha1-õåø ñòðîêè "id:phone:status:<ñåêðåòíàÿ ñòðîêà>". Passed if it was specified as an additional parameter in the http (s) address of the handler.
crc32Êîíòðîëüíàÿ ñóììà crc32 ñòðîêè "id:phone:status:<ñåêðåòíàÿ ñòðîêà>". Passed if it was specified as an additional parameter in the http (s) address of the handler.
Additional parameters for HLR requests
imsiUnique IMSI code of the subscriber's SIM card.
mscThe number of the service center of the operator in whose network the subscriber is located.
mccNumeric code of the subscriber's country.
mncNumeric code of the subscriber's operator.
cnName of the country of registration of the subscriber.
netName of the subscriber registration operator.
rcnThe name of the roaming country of the subscriber when he is in a foreign network.
rnetThe name of the roaming operator of the subscriber when he is in someone else's network.

Transmitted parameters for an incoming SMS message:

OptionThe value
idUnique ID of the incoming message, assigned by the Server automatically.
sms_idThe ID of the message to which the response was received. This parameter is omitted if the message from the subscriber was sent to a dedicated incoming number or when the subscriber specified the prefix "login, colon and space".
phoneSubscriber's phone number.
mesText of the SMS message.
toThe incoming phone number to which the message was sent by the subscriber.
smscThe SMS center of the operator from whom the incoming message was received.
sentSending a message to the subscriber in the form of a stamp in seconds.
timeThe time when the message was received by the Server in the form of a stamp in seconds.
md5MD5-õåø ñòðîêè "phone:mes:to:<ñåêðåòíàÿ ñòðîêà>". Passed if it was specified as an additional parameter in the http (s) address of the handler.
sha1sha1-õåø ñòðîêè "phone:mes:to:<ñåêðåòíàÿ ñòðîêà>". Passed if it was specified as an additional parameter in the http (s) address of the handler.
crc32Êîíòðîëüíàÿ ñóììà crc32 ñòðîêè "phone:mes:to:<ñåêðåòíàÿ ñòðîêà>". Passed if it was specified as an additional parameter in the http (s) address of the handler.

Transmitted parameters when using the service " Number confirmation with a call":

OptionThe value
waitcall1 – service message flag for the service " Number confirmation with a call".
phoneThe phone number of the subscriber from whom the call was received.
tsCall time.
md5MD5-õåø ñòðîêè "phone:ts:<ñåêðåòíàÿ ñòðîêà>". Passed if it was specified as an additional parameter in the http (s) address of the handler.
sha1sha1-õåø ñòðîêè "phone:ts:<ñåêðåòíàÿ ñòðîêà>". Passed if it was specified as an additional parameter in the http (s) address of the handler.
crc32Êîíòðîëüíàÿ ñóììà crc32 ñòðîêè "phone:ts:<ñåêðåòíàÿ ñòðîêà>". Passed if it was specified as an additional parameter in the http (s) address of the handler.

Additional parameters transmitted when using the voice menu function in calls:

OptionThe value
calltime The time of the call, after which the key was pressed on the numeric keypad of the subscriber's phone, or the total time of the call.
callmenuThe sequence of keys on the phone's numeric keypad that the caller pressed while navigating through the voice menu.
ringtimeWaiting time for the subscriber to pick up the phone.

In addition to the standard parameters described above, the Server will also send all the parameters specified in the http(s) address of the handler after the"? " sign using the POST method".

To distinguish between the status of a message, an incoming SMS message, or a service message (when using the "Confirm number by calling" service), you can check for the presence of the mes parameter (for an incoming message) and waitcall in the same handler (for the number confirmation service): if (isset($_POST["mes"])) {
   
// message
}
elseif (isset(
$_POST["waitcall"])) {
   
// confirmation
}
else {
   
// status
}

Statuses are forwarded to the Client handler only when sending messages over the HTTP/HTTPS, SMTP, or SMPP protocols. When sending messages from the personal account, the transfer of statuses to the Client's handler does not occur.

If the Client handler returns a response with an error code other than 200 or 404, the Server will repeat the request to the handler with a certain frequency (1 request every 4 minutes, total 50 attempts).

Connecting anti-spam verification (captcha) to the site

Sometimes there is a need to send messages from your site at the request of users, and in such cases, to exclude automated spam mailings with the help of robots, you can easily implement anti-spam verification using our service.

To do this, it is enough to place a special code for displaying the image (captcha) and fields for entering the code on the form for sending messages:

Êîä ñ êàðòèíêè <img src="https://smscentre.com/sys/imgcode.php?1.1" onclick="src+=1" width="50" height="18" border="1">
<
input type="text" size="9" name="code">
and pass it with other form data to the corresponding message sending script as the value of the imgcode parameter.

Also, with this parameter, you must pass the value of the IP address of the user to whom the image was displayed as the value of the userip parameter.

Examples:

Example of a script for sending messages using the code from the image (captcha) received from the form:

include_once "smsc_api.php";

if (
$_POST["sendsms"]) {
   
$r = send_sms($_POST["phone"], "Âàø êîä äëÿ ðåãèñòðàöèè íà ñàéòå mysite.com 123321.", 0, 0, 0, 0, false, "imgcode=".$_POST["code"]."&userip=".$_SERVER["REMOTE_ADDR"]);

if (
$r[1] > 0)
    echo
"<script>alert('Ñîîáùåíèå îòïðàâëåíî íà íîìåð ".$_POST["phone"]."')</script>";
elseif (
$r[1] == -10)
    echo
"<script>alert('Âû ââåëè íåâåðíûé êîä ñ êàðòèíêè!')</script>";
}

Confirm your phone number with a call

For various types of operations, such as password recovery, authorization in public Wi-Fi networks, confirmation of money transfers, logging in to your personal account, and so on, you need to send authentication data. Using our API, you can organize the procedure for confirming the phone number by calling the subscriber himself.

To create a request to receive a phone number, at which the subscriber will have to make a confirmation call, you need to call the address using the GET or POST method: https://smscentre.com/sys/wait_call.php?login=<login>&psw=<password>&phone=<phone>
The following parameters are 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).
phoneThe phone number of the subscriber from which the confirmation call will be made.

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).
3Insufficient funds on the Client's account.
4The IP address is temporarily blocked.
5The specified phone number of the subscriber is in the black list of the Client.
6It was not possible to get the cost of the service due to the settings in the Client's personal account (allowed numbers, time of dispatch, etc..).
9Attempt to send more than fifty identical requests to get a phone number for confirmation 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: phone = <phone>, all_phones = <all_phones>

  • when fmt = 1 (the first is the number to which the subscriber needs to call): <all_phones>

  • when fmt = 2:
    <result>
    <phone>phone</phone>
    <all_phones>
    <phone>phone</phone>
    ...
    <phone>phone</phone>
    </all_phones>
    </result>

  • when fmt = 3:
    {
    "phone": "<phone>",
    "all_phones": [
    <phone>",
    ...
    "<phone>"
    ]
    }

Where:
<phone> – the phone number to which the subscriber must make a call within 15 minutes to confirm their phone number.
<all_phones> – a list of all possible phone numbers, one of which was assigned by the system to call the subscriber (depending on the country).

After the subscriber's call, the Server records the fact of the call in the form of an incoming message with the text "[waitcall] " and sends all the necessary information about this call to the Client's handler.

The server does not accept more than fifty identical requests to get a phone number for confirmation within a minute to reduce the load and protect against errors and loops in the Client-side program.

Actions with deferred tasks

To reduce the load on the Server when unloading a large package of sent messages, the system implemented a deferred task mechanism. This mechanism periodically selects active tasks for unloading message packets and executes them. This allows not only to reduce the load on the Server, but also to eliminate delays in the formation and unloading of message packets in the Client's browser.

To get a list of pending tasks, you must use the GET or POST method to call the address: https://smscentre.com/sys/downloads.php?login=<login>&psw=<password>&get_list=1
To receive the task file with the sent messages, you must use the GET or POST method to call the address: https://smscentre.com/sys/downloads.php?login=<login>&psw=<password>&get_file=1&id=<id> or https://smscentre.com/sys/downloads.php?login=<login>&psw=<password>&get_file=1&name=<name>
The following parameters are 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).
cntThe number of pending tasks returned by the Server.
after_idThis parameter indicates to the Server that it is necessary to return a list of tasks with IDs following after_id in the response..
idUpload a task file with an ID equal to id.
nameUpload a task file named name.

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.
5The deferred task or download file was not found in the system.
9Attempt to send more than three identical requests to receive a list of tasks or to download a file 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 you receive a list of pending tasks:
  • when fmt = 0: id = <id>, name = <name>, status = <status>, created = <created>, time = <time>, file = <file>

  • when fmt = 1: <id>,<name>,<status>,<created>,<time>,<file>

  • when fmt = 2:
    <list>
    <task>
    <id>id</id>
    <name>name</name>
    <status>status</status>
    <created>created</created>
    <time>time</time>
    <file>file</file>
    </task>
    ...
    </list>

  • when fmt = 3:
    [{ "id": id,
    "name": "name",
    "status": "status",
    "created": "created",
    "time": "time",
    "file": "file"
    },
    ...]

Where:
<id> – iD of the deferred task.
<name> – name task.
<status> – task status (0 - pending, 1 - in progress, 2 - completed, 3 - canceled, 4 - execution error).
<created> – date the task was created.
<time> – task start time.
<file> – the name of the task file.

After assigning the status 2 (completed) to the deferred task, you will be able to download a file with a package of sent messages in csv format.

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