| HTTP/HTTPS protocol
Backup server address: www2.smscentre.com.
Отправка сообщенийSending an SMS messageTo 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
Для отправки SMS с передачей параметров в формате json в теле запроса необходимо вызвать методом POST адрес:
https://smscentre.com/rest/send/
Description of the parameters passed to the Server :
Option | The value
|
---|
login | Customer Login.
|
---|
psw | Client Password (you can add or change it on this page).
|
---|
phones | The 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
.
|
---|
mes | The 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
|
---|
id | The 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 ."-_".
|
---|
sender | The 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.
|
---|
translit | A 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".
|
---|
tinyurl | Automatically 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.
|
---|
time | The time of sending the SMS message to the subscriber.
Formats:
- DDMMYYhhmm or DD.MM.YY hh: mm.
- 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.
- 0ts, where ts is timestamp, the time in seconds since January 1, 1970.
- +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.
|
---|
tz | The 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.
|
---|
period | The 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.
|
---|
freq | The 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.
|
---|
flash | Indicates whether a Flash message is displayed immediately on the phone screen.
0 (default) – normal message. 1 – Flash сообщение.
|
---|
bin | Binary 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.
|
---|
push | A 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.
|
---|
hlr | A 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.
|
---|
ping | Indicates 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.
|
---|
mms | A 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.
|
---|
mail | The 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.
|
---|
soc | A 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.
|
---|
viber | Flag of the viber message sent to users of the Viber messenger.
0 (default) – normal message. 1 – viber message.
|
---|
whatsapp | A sign of a whatsapp message sent to WhatsApp messenger users.
0 (default) – normal message. 1 – whatsapp message.
|
---|
bot | Имя бота (telegram), в который необходимо отправить сообщение в формате "@botname_bot".
|
---|
smsreq | When 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.
|
---|
fileurl | The full http address of the file to upload and transmit in the message. The minimum file size is 101 bytes.
|
---|
call | Indicates 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.
|
---|
voice | The voice used for voicing the text (only for voice messages).
m – male voice. m2 – male voice 2. m3 (по умолчанию) – мужской голос 3. m4 – male voice 4.
w – женский голос. w2 – female voice 2. w3 – female voice 3. w4 – female voice 4.
При отправке сообщений также возможно указание языка озвучивания текста в виде: "m,en", "w,fr", "w,de" и т.п.
|
---|
param | Comma-separated list of parameters for a voice message in the format " param=w, i,n".
Здесь:
- 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).
If you specify a value for any parameter other than the possible values, the default values of all parameters will be used (n = 8, w = 25, i from 3 to 14 seconds incrementally).
|
---|
subj | The 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.
|
---|
charset | Кодировка переданного сообщения, если используется отличная от кодировки по
умолчанию windows-1251. Варианты: utf-8 и koi8-r.
|
---|
cost | Indicates 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.
|
---|
fmt | Format 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.
|
---|
list | A 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.
В случае необходимости передачи разных имен отправителей (и, возможно, различных часовых поясов абонентов (работает только для запросов, в которых параметр time представлен в виде DDMMYYhhmm или DD.MM.YY hh:mm)) для разных сообщений можно использовать следующий формат передачи:
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.
|
---|
valid | The "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.
|
---|
maxsms | The 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.
|
---|
imgcode | The value of the alphanumeric code entered with "captcha" when using anti-spam verification.
This parameter must be used in conjunction with the userip parameter.
|
---|
userip | The 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".
|
---|
err | Indicates 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.
|
---|
op | Indicates 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..
|
---|
pp | Binds 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.
После принятия и обработки данных Сервер возвращает Клиенту подтверждение с указанием результата обработки.
All parameters that contain special characters (plus, space, etc.) must be encoded using the urlencode function to be passed in an HTTP request..
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 сообщения> – для ошибок 3,6,7,8.
When fmt = 1:
- 0,-N – for errors 1,2,4,5,9;
- <id сообщения>,-N – для ошибок 3,6,7,8.
When fmt = 2:
- Для ошибок 1,2,4,5,9:
<result>
<error>description</error>
<error_code>N</error_code>
</result> |
- Для ошибок 3,6,7,8:
<result>
<error>description</error>
<error_code>N</error_code>
<id>id сообщения</id>
</result> |
When fmt = 3:
- Для ошибок 1,2,4,5,9:
{
"error": "description",
"error_code": N
} |
- Для ошибок 3,6,7,8:
{
"error": "description",
"error_code": N,
"id": <id сообщения>
} |
N – error number, can take the following values:
The value | Description
|
---|
1 | Error in parameters.
|
---|
2 | Invalid 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).
|
---|
3 | Insufficient funds on the Client's account.
|
---|
4 | IP address is temporarily blocked due to frequent errors in the queries. read More
|
---|
5 | Invalid date format.
|
---|
6 | The 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.
|
---|
7 | Invalid phone number format.
|
---|
8 | The message to the specified number can not be delivered.
|
---|
9 | Sending 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> – стоимость SMS-сообщения.
<status> – sMS Message status code.
<error> – error code in the status.
The server does not accept more than one identical request for sending SMS messages within a minute
to protect against errors and loops in the Client-side program in order to reduce the load and not
spend the Client's funds, as well as to prevent multiple messages from being sent to the same 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 messagesExamples:
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:
https://smscentre.com/sys/send.php?login=alex&psw=123&phones=79999999999%2C78888888888&mes=Hello!%0A~~~%0AComment
Sending multiple messages via the list parameter:
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 редактировании группы можно указать номер группы для рассылок сообщений.
Тогда при отправке сообщения вместо списка телефонов можно будет указывать короткий код 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 HLR-query
You can check phone numbers for availability by sending a special HLR request.
As a result of the request, data will be received about the country and the subscriber's operator,
about the roaming operator when the subscriber is in a foreign network, as well as about the status of the subscriber
(available or not). Subscribers who are the owners of the verified numbers will not receive any
notifications about the performed checks of 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 MMS message
Для отправки MMS-сообщения необходимо вызвать методом GET или POST адрес:
https://smscentre.com/sys/send.php?login=<login>&psw=<password>&phones=<phones>&mes=<message>&mms=1
If you plan to send any files (text, music, audio, video), then you need to send them using the POST method in the body
http (s)-request to the server. It is also possible to send an external file in the request via the fileurlparameter, which contains
the full http (s) address of the file, or to add an https link to the message text of a previously downloaded file, which you can find out in your personal account
on the sending page by clicking "attach file" - " Downloaded files".
The maximum number of attachments passed in a request is twenty, and the total size of all attachments must not
exceed 300 KB. If the specified limits are exceeded, the remaining attachments will be transmitted as links. For an MMS message, specify the subject or text
it is mandatory.
Examples:
Отправка MMS-сообщения с темой "Privet" и текстом "Hello":
https://smscentre.com/sys/send.php?login=alex&psw=123&phones=79999999999&mes=Hello&subj=Privet&mms=1
Sending MMS with the subject "Holiday" and two photos via library based on cURL:
<?php include "smsc_api.php"; send_sms("79999999999", "", 0, 0, 0, 7, false, "subj=Holiday", array("/home/alex/1.jpg", "/home/alex/2.jpg")); ?>
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 messagesExamples:
Отправка e-mail на адрес "alex@mysite.com" с темой "Privet" и текстом "Hello" от отправителя "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
Отправка e-mail с темой "Holiday" и двумя фотографиями через библиотеку на основе cURL:
<?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")); ?>
Отправка e-mail с темой "Hello" и фотографией, загруженной ранее на сервер:
<?php include "smsc_api.php"; send_sms("alex@mysite.com", "Hello, this is my photo <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 – женский голос.
- voice = w2 – female voice 2.
- voice = w3 – female voice 3.
- voice = w4 – female voice 4.
При отправке сообщений также возможно указание языка озвучивания текста в виде: "m,en", "w,fr", "w,de" и т.п.
Использование голосового меню (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: <...>}:
Option | The value
|
---|
*: back | Return to the previous menu.
|
---|
#: start | Return to the beginning of the menu and repeat the " MENU TEXT".
|
---|
0: repeat | Repeat the selected item.
|
---|
n: msg | The 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: msg | Sub-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:
Team | The value
|
---|
url | Адрес http(s)-обработчика Клиента, на который будет передана информация о текущем пункте и времени нахождения абонента в меню.
|
---|
call:phone wait=n ok:end err:n record | Redirects 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,msg | Sending 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: n | Recording 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.
|
---|
end | Indicates 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 messagesExamples:
Sending a voice message with the text " Hello":
https://smscentre.com/sys/send.php?login=alex&psw=123&phones=79999999999&mes=Hello&call=1
Отправка голосового сообщения с текстом "Hello" от номера телефона "79991234567":
https://smscentre.com/sys/send.php?login=alex&psw=123&phones=79999999999&mes=Hello&call=1&sender=79991234567
Отправка голосового сообщения с текстом "Hello world", озвученным мужским голосом, с временем ожидания снятия трубки 20 секунд,
интервалом повтора 10 секунд и количеством попыток дозвона равным 3:
https://smscentre.com/sys/send.php?login=alex&psw=123&phones=79999999999&mes=Hello%20world&call=1&voice=m¶m=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
Отправка голосового сообщения с прикрепленным через параметр fileurl голосовым файлом:
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 Sending imagesЕсли на каждый номер планируется отправлять отдельную картинку в сообщении, то в этом случае необходимо or передавать полный http(s)-адрес внешнего файла in the form of <file http(s)://...>, or send an additional fileurl parameter in the request that contains the full http(s) address of the image. When using fileurl, passing the mes parameter in the request is optional.
If, when creating a mailing list, one text is supposed to be sent to several numbers, then you need to insert the full http(s) link of the previously uploaded image file into the message text, which you can find out in your personal account on the sending page by clicking "attach file"-"Uploaded files". The attached file must not exceed 512 Kb in size and must meet one of the following formats: JPG, GIF, PNG.Adding a buttonTo 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 typesThe system supports the following types of viber messages:
- Text only-the subscriber receives a text message.
- Picture only-the subscriber receives the picture.
- Текст+кнопка – абонент получает текстовое сообщение, под которым расположена кнопка. При нажатии на кнопку происходит переход по заданной ссылке.
- Текст+кнопка+картинка – абонент получает текстовое сообщение, под которым расположены картинка и кнопка. При нажатии на кнопку происходит переход по заданной ссылке.
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 messagesExamples:
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 templates for testing 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 Отправка telegram-сообщения
Для отправки telegram-сообщения необходимо вызвать методом GET или POST адрес:
https://smscentre.com/sys/send.php?login=<login>&psw=<password>&phones=<phones>&mes=<message>&bot=<@botname_bot> Примеры отправки telegram-сообщенийExamples:
Отправка telegram-сообщения с текстом "Hello" на номер "79999999999" в telegram-бот "@mybot_bot":
https://smscentre.com/sys/send.php?login=alex&psw=123&phones=79999999999&mes=Hello&bot=@mybot_bot
Отправка telegram-сообщения с текстом "Привет" на номер "79999999999" в telegram-бот "@mybot_bot" с указанием в параметре smsreq количества дней,
по истечении которого будет необходимо подтвердить номер телефона SMS-кодом:
https://smscentre.com/sys/send.php?login=alex&psw=123&phones=79999999999&mes=Привет&bot=@mybot_bot&smsreq=25
Using prefixes when sending messagesTo send various types of messages you can use the special prefix at the start or instead of text messages.
Supported prefixes:
Name | Description
|
---|
__CALL__: message | Отправка голосового сообщения (звонка). При отправке голосового сообщения в конце текста можно указать
специальную комбинацию "\n~~~\n" (перевод строки, 3 символа тильды и снова перевод строки), после которой передать параметр param,
определяющий некоторые характеристики звонка (более подробно можно посмотреть в описании).
При формировании сообщения можно указывать как текст, так и добавлять медиа-файлы форматов wav и mp3, а также вставлять
ранее загруженные файлы. Более подробно по процеccу создания голосового сообщения можно прочитать на данной странице.
| __VIBER__: message | Отправка сообщения пользователям мессенджера Viber.
| __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__ | Признак HLR-запроса для получения информации о номере из базы оператора без отправки реального SMS. Более подробно
по HLR-запросам можно ознакомиться здесь.
|
Examples:
Отправка голосового сообщения с текстом "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 HLR-query:
https://smscentre.com/sys/send.php?login=alex&psw=123&phones=79999999999&mes=__HLR__ Managing message templatesTo 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:
Option | The value
|
---|
login | Customer Login.
|
---|
psw | Client Password (you can add or change it on this page).
|
---|
name | Название шаблона.
|
---|
msg | The text of the message.
|
---|
format | Message 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.
|
---|
sender | Sender 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 value | Description
|
---|
1 | Error in parameters.
|
---|
2 | Invalid 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).
|
---|
3 | Запись не найдена.
|
---|
4 | The IP address is temporarily blocked.
|
---|
5 | Save or delete error.
|
---|
9 | Attempt 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:
When changing or deleting a template:
- when fmt = 0, 1: OK
- when fmt = 2:
<result>OK</result>
- when fmt = 3:
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> – template ID assigned by the system automatically.
<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 templatesTo manage service and transactional message templates, you need to call the appropriate address using the GET or POST method, specifying the required command
and parameters.
To create a template (для всех операторов):
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&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:
Option | The value
|
---|
login | Customer Login.
|
---|
psw | Client Password (you can add or change it on this page).
|
---|
sender | The name of the sender for which the template is being created.
|
---|
msg | Template Text.
|
---|
charset | Кодировка текста шаблона, если используется отличная от кодировки по умолчанию windows-1251. Варианты: utf-8 и koi8-r.
|
---|
mts_srv | Create a template for the MTS operator (service messages).
|
---|
mts_auth | Create a template for the MTS operator (authorization messages).
|
---|
mts_trn | Create a template for the MTS operator (transactional messages).
|
---|
mega_srv | Create a template for the Megafon operator (service (information) messages).
|
---|
mega_auth | Create a template for the Megafon operator (authorization messages).
|
---|
mega_trn | Create a template for the Megafon operator (transactional messages).
|
---|
bee_srv | Create a template for the Beeline operator (service messages).
|
---|
bee_trn | Create a template for the Beeline operator (transactional messages).
|
---|
tele2_srv | Create a template for the Tele2 operator (service messages).
|
---|
tele2_trn | Create a template for the Tele2 operator (transactional messages).
|
---|
motiv_srv | Создать шаблон для оператора МОТИВ (service messages).
|
---|
motiv_trn | Создать шаблон для оператора МОТИВ (transactional messages).
|
---|
soc | Create 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 value | Description
|
---|
1 | Error in parameters.
|
---|
2 | Invalid 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).
|
---|
4 | The IP address is temporarily blocked.
|
---|
9 | Attempt 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> – operator name and message type.
<id> – 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 during the sending process, the messages will go
through all the stages of processing along the chain "Waiting to be sent" – "Sent to the operator" – "Delivered". You can get message statuses either on
request or on your own http handler. You can send both single messages and mass mailings.
You can test different types of messages (SMS, binary messages, HLR, MMS, call), except for e-mail..Event NotificationsWhen 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:
Option | The value
|
---|
login | Customer Login.
|
---|
psw | Client Password (you can add or change it on this page).
|
---|
id | ID of the task group (the "ID" column").
|
---|
name | The name of the rule or server in the task. Replaces the {NAME} macro in the notification text.
|
---|
host | The address or IP of the server being checked. Replaces the {HOST} macro}.
|
---|
info | Additional information about the event. Replaces the macro {INFO}.
|
---|
ok | When 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 value | Description
|
---|
1 | Error in parameters.
|
---|
2 | Invalid 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).
|
---|
3 | Task group not found.
|
---|
4 | The IP address is temporarily blocked.
|
---|
9 | Attempt 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:
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 listsTo 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):
Option | The value
|
---|
login | Customer Login.
|
---|
psw | Client Password (you can add or change it on this page).
|
---|
name | Mailing list name.
|
---|
phones | The 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
.
|
---|
mes | The 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
|
---|
sender | The 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.
|
---|
sender2 | This 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..
|
---|
translit | A 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".
|
---|
tinyurl | Automatically 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.
|
---|
time | The time of sending the SMS message to the subscriber.
Formats:
- DDMMYYhhmm or DD.MM.YY hh: mm.
- 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.
- 0ts, where ts is timestamp, the time in seconds since January 1, 1970.
- +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.
|
---|
rpt | Determines 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.
|
---|
rptn | Sets the maximum number of repetitions for a deferred periodic distribution.
|
---|
tz | The 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.
|
---|
period | The 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.
|
---|
freq | The 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.
|
---|
flash | Indicates whether a Flash message is displayed immediately on the phone screen.
0 (default) – normal message. 1 – Flash сообщение.
|
---|
bin | Binary 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.
|
---|
push | A 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.
|
---|
hlr | A 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.
|
---|
ping | Indicates 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.
|
---|
mms | A 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.
|
---|
mail | The 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.
|
---|
soc | A 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.
|
---|
viber | Flag of the viber message sent to users of the Viber messenger.
0 (default) – normal message. 1 – viber message.
|
---|
whatsapp | A sign of a whatsapp message sent to WhatsApp messenger users.
0 (default) – normal message. 1 – whatsapp message.
|
---|
bot | Имя бота (telegram), в который необходимо отправить сообщение в формате "@botname_bot".
|
---|
smsreq | When 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.
|
---|
fileurl | The full http address of the file to upload and transmit in the message. The minimum file size is 101 bytes.
|
---|
mes2 | This 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.
|
---|
call | Indicates 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.
|
---|
voice | The voice used for voicing the text (only for voice messages).
m – male voice. m2 – male voice 2. m3 (по умолчанию) – мужской голос 3. m4 – male voice 4.
w – женский голос. w2 – female voice 2. w3 – female voice 3. w4 – female voice 4.
При отправке сообщений также возможно указание языка озвучивания текста в виде: "m,en", "w,fr", "w,de" и т.п.
|
---|
param | Comma-separated list of parameters for a voice message in the format " param=w, i,n".
Здесь:
- 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).
If you specify a value for any parameter other than the possible values, the default values of all parameters will be used (n = 8, w = 25, i from 3 to 14 seconds incrementally).
|
---|
subj | The 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.
|
---|
charset | Кодировка переданного сообщения, если используется отличная от кодировки по
умолчанию windows-1251. Варианты: utf-8 и koi8-r.
|
---|
cost | Indicates whether you need to receive the cost of the mailing list.
0 (default) – normal sending. 1 –
add the cost of mailing to the response.
|
---|
fmt | Format 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.
|
---|
list | A 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.
В случае необходимости передачи разных имен отправителей (и, возможно, различных часовых поясов абонентов (работает только для запросов, в которых параметр time представлен в виде DDMMYYhhmm или DD.MM.YY hh:mm)) для разных сообщений можно использовать следующий формат передачи:
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.
|
---|
tpl | ID of the template to be used as the message text. To use the template
, the mes parameter must be empty.
|
---|
valid | The "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:
Option | The value
|
---|
login | Customer Login.
|
---|
psw | Client Password (you can add or change it on this page).
|
---|
id | ID of the mailing list. Returned by the Server after creation and used for further identification of the mailing list.
|
---|
Additional options
|
---|
start | Дата, с которой требуется получить список рассылок. Если данный параметр не указан, возвращает список рассылок за последние 2 месяца, но не более 10. Применяется совместно с параметром get_all. Формат: 'дд.мм.гггг'.
|
---|
end | The date before which you want to receive the mailing list. If this parameter is not specified, the mailing list is returned up to the current date, but no more than 10. Used in conjunction with the get_all parameter. Format: 'dd.mm.yyyy'.
|
---|
Required parameters are login, psw, and id.
После принятия и обработки данных Сервер возвращает Клиенту подтверждение с указанием результата обработки.
All parameters that contain special characters (plus, space, etc.) must be encoded
using the urlencode function to be passed in an HTTP request..
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:
- Для ошибок 1,2,3,4,5,9:
<result>
<error>description</error>
<error_code>N</error_code>
</result> |
When fmt = 3:
- Для ошибок 1,2,3,4,5,9:
{
"error": "description",
"error_code": N
} |
N – error number, can take the following values:
The value | Description
|
---|
1 | Error in parameters.
|
---|
2 | Invalid 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).
|
---|
3 | Error saving a record.
|
---|
4 | IP address is temporarily blocked due to frequent errors in the queries. read More
|
---|
5 | Invalid date format.
|
---|
9 | Sending 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:
- 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:
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 operationsExamples:
Создание SMS-рассылки:
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:
Option | The value
|
---|
login | Customer Login.
|
---|
psw | Client Password (you can add or change it on this page).
|
---|
phone | A 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.
|
---|
id | Message 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.
|
---|
fmt | Формат ответа сервера:
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.
|
---|
all | 0 – (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.
|
---|
charset | The encoding of the query result, if used
other than the default windows encoding-1251. Options: utf-8 and koi8-r.
|
---|
del | 1 – delete a previously sent message. Used in conjunction with
the phone and id parameters. This parameter is described in more detail here.
|
---|
Server response and error codesIf 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 value | Description
|
---|
1 | Error in parameters.
|
---|
2 | Invalid 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).
|
---|
4 | The IP address is temporarily blocked.
|
---|
5 | Error deleting a message.
|
---|
9 | Attempt 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:
- при fmt = 0 и all = 0: Status = <status>, check_time = <last_date>, err = <err>
- при fmt = 1 и all = 0: <status>,<last_timestamp>,<err>
- при fmt = 2 и 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> |
- при fmt = 3 и all = 0:
{
"status": <status>,
"last_date": "<last_date>",
"last_timestamp": <last_timestamp>,
"flag": <flag>,
"err": <err>
} |
- при fmt = 0 и 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>
|
- при fmt = 1 и all = 1:
<status>,<last_timestamp>,<err>,<send_timestamp>,<phone>,<cost>,<sender>,<status_name>,<message>, <comment>, <type>
- при fmt = 2 и 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>
|
- при fmt = 3 и 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>
} |
- при fmt = 0 и 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>
|
- при fmt = 1 и all = 2:
<status>,<last_timestamp>,<err>,<send_timestamp>,<phone>,<country>,<operator>,<region>,<cost>,<sender>,<status_name>,<message>, <comment>, <type>
|
- при fmt = 2 и 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>
|
- при fmt = 3 и 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.
<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:
- при fmt = 0 и 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> |
- при fmt = 1 и all = 0: <status>,<last_timestamp>,<err>,<imsi>,<msc>,<mcc>,<mnc>,<cn>,<net>,<rcn>,<rnet>
- при fmt = 2 и 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> |
- при fmt = 3 и 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>"
} |
- при fmt = 0 и 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> |
- при fmt = 1 и all = 1:
<status>,<last_timestamp>,<err>,<imsi>,<msc>,<mcc>,<mnc>,<cn>,<net>,<rcn>,<rnet>,
<send_timestamp>,<phone>,<cost>,<sender_id>,<status_name>,<message>,<type> |
- при fmt = 2 и 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> |
- при fmt = 3 и 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>
} |
- при fmt = 0 и 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> |
- при fmt = 1 и 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> |
- при fmt = 2 и 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> |
- при fmt = 3 и 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).
Если сообщение не найдено или находится в архивной базе (значение статуса равно -3), то для fmt = 0,2,3 возвращается код статуса в
соответствующем формате. Для fmt = 1 возвращается ответ в формате статуса обычного сообщения.
When multiple statuses are requested:
- для fmt = 0 и fmt = 1 в результате возвращается список строк, каждая из которых содержит информацию о статусе соответствующего сообщения.
- для fmt = 2 формат возвращаемых статусов аналогичен формату для одиночных сообщений, при этом весь список статусов заключается в тег "<list>".
- для fmt = 3 формат также аналогичен формату для одиночных сообщений, статусы перечисляются через запятую, и весь список обрамляется
квадратными скобками.
В случае множественного запроса статусов при значении параметра all = 1 или all = 2 для каждого статуса дополнительно возвращается идентификатор
сообщения. При all = 0 дополнительно возвращается идентификатор сообщения и номер телефона.Status codesPossible variants of message status codes or HLR requests (values of <status>):
Code | Name | Description
|
---|
-3 | Message not found | Occurs if no message was found for the specified phone number and ID.
|
---|
-2 | Остановлено | Occurs 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.
|
---|
-1 | Waiting send | If 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.
|
---|
0 | Transferred to the operator | The message was sent to the operator's SMS center for delivery.
|
---|
1 | Delivered | The message was successfully delivered to the subscriber.
|
---|
2 | Read | The message was read (opened) by the subscriber. This status is possible for e-mail messages that have the format of an html document.
|
---|
3 | Expired | Occurs 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.
|
---|
4 | Click on link | The 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".
|
---|
20 | Unable to deliver | The attempt to deliver the message failed, this can be caused by various reasons, for example,,
subscriber is blocked, не существует, it is roaming without SMS exchange support, or his phone doesn't support receiving SMS messages.
|
---|
22 | Wrong number | Incorrect phone number format.
|
---|
23 | Banned | Occurs 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).
|
---|
24 | Insufficient funds | The Client's account does not have enough money to send the message.
|
---|
25 | Unavailable number | The 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 statusPossible error codes in the status of messages or HLR requests (values of <err>):
Code | Name | Description
|
---|
0 | No error | The subscriber exists and is available.
|
---|
1 | The subscriber does not exist | The specified phone number does not exist.
|
---|
6 | Subscriber is offline | The subscriber's phone is disconnected or out of range of the network.
|
---|
11 | Не подключена услуга | Means 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.
|
---|
12 | Error in the subscriber's phone | The message cannot be delivered to the subscriber due to an error in the phone or SIM card.
|
---|
13 | Subscriber is blocked | Occurs, 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.
|
---|
21 | No support for the service | The subscriber's device does not support this service (service).
|
---|
200 | Virtual sending | This 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
)").
|
---|
219 | SIM Card Replacement | Error 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..
|
---|
220 | Queue overflowed from operator | This 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.
|
---|
237 | The caller is not responding | Occurs if the caller did not pick up the phone during the dial attempt.
|
---|
238 | No template | Occurs if sending a message is possible only according to a certain template, and
the message being sent does not satisfy it.
|
---|
239 | Запрещенный ip-адрес | Occurs 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.
|
---|
240 | Subscriber is busy | Occurs when sending a voice message to a subscriber if the line is busy or the subscriber
has canceled the call.
|
---|
241 | Ошибка конвертации | An 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.
|
---|
242 | Recorded answering machine | Means that an answering machine was fixed on the subscriber's side when the voice message was sent
.
|
---|
243 | No contract | Occurs when you try to send mailings of an advertising or mass nature without
a signed contract.
|
---|
244 | Рассылка запрещена | It means that the sending of mass and advertising mailings is prohibited for this Client,
or a prohibited link is found in the message text.
|
---|
245 | Status is not received | During 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.
|
---|
246 | Time limit | Если в личном кабинете в пункте "Настройки" во вкладке "Лимиты и ограничения"
установлено "Время отправки" и галочка "запретить отправку в другое время", то при попытке отправки SMS-сообщений в период
времени, отличный от указанного в поле "Время отправки", отправка сообщений будет запрещаться с указанием данной ошибки.
|
---|
247 | Limit exceeded messages | Exceeded the total daily message limit specified by the Client in the personal account
in the "Settings" section".
|
---|
248 | No route | This 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.
|
---|
249 | Invalid number format | Occurs when the mobile code of the specified number and
the number length corresponding to this code are incorrect.
|
---|
250 | Telephone number is forbidden settings | The number fell under the restrictions set by the Client for mobile numbers in
the personal account in the "Settings" section".
|
---|
251 | Limit is exceeded on a single number | Exceeded 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.
|
---|
252 | Number not permitted | Occurs, for example, when a Client tries to specify one of our federal numbers
as the recipient of an SMS message.
|
---|
253 | Prohibited spam filter | If 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.
|
---|
254 | Unregistered sender id | This error occurs when you try to send a message from an unregistered
sender name.
|
---|
255 | Rejected by operator | The 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>):
Code | Name | Description
|
---|
0 | No error | The recipient exists and is available.
|
---|
1 | Recipient does not exist | The specified e-mail address does not exist.
|
---|
2 | Crowded Inbox | The recipient's mail server rejected the message with the specified error code.
|
---|
3 | Recipient server was not found | The domain specified as the mail server was not found.
|
---|
4 | Mailbox is locked | An error returned from the recipient's mail server stating
that the message could not be delivered due to the mailbox being blocked.
|
---|
239 | Запрещенный ip-адрес | Occurs 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.
|
---|
245 | Status is not received | During 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.
|
---|
248 | No route | 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.
|
---|
249 | Invalid format' | Occurs when the recipient's e-mail address is entered incorrectly in the format.
|
---|
252 | E-mail address is prohibited | Возникает, например, при нахождении указанного e-mail адреса в черном списке.
|
---|
253 | Prohibited spam filter | Если текст сообщения содержит нецензурные выражения и оскорбления, призывы отправить
sms или e-mail и некоторые другие запрещенные тексты, то отправка сообщения заблокируется. Также запрещено указывать в качестве
отправителя e-mail адрес получателя сообщения, адреса чужих интернет-ресурсов, компаний и государственных организаций.
|
---|
254 | Unregistered sender | This error occurs when trying to send a message from an unregistered
e-mail address of the sender.
|
---|
255 | Rejected by the recipient server | The recipient's mail server rejected the message without specifying the exact error code. Такое бывает, например,
при возникновении внутренней ошибки сервера, когда он не может обработать сообщение.
|
---|
Deleting a messageДля удаления сообщения необходимо вызвать методом GET или POST скрипт запроса статуса, указав команду del:
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:
Удаление сообщений необходимо производить до переноса в архивную базу.
Checking the balance statusBalance RequestTo request a balance, use the address:
https://smscentre.com/sys/balance.php?login=<login>&psw=<password>
The following parameters are passed to the server:
Option | The value
|
---|
login | Customer Login.
|
---|
psw | Client Password (you can add or change it on this page).
|
---|
cur | Flag indicating whether the Client's currency name should be added to the server response.
|
---|
fmt | Формат ответа сервера:
0 or 1 – (default) as a string (250.80).
2 – in xml format.
3 – in json format.
|
---|
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 value | Description
|
---|
1 | Error in parameters.
|
---|
2 | Invalid 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).
|
---|
4 | The IP address is temporarily blocked.
|
---|
9 | Attempt 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 groupsTo manage contacts or groups, use the GET or POST method to call the appropriate address with the
required command and parameters..
Для создания контакта:
https://smscentre.com/sys/phones.php?add=1&login=<login>&psw=<password>&phone=<phone>&name=<name>
Для создания новой группы:
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>
Для удаления контакта:
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>
Для вывода списка групп:
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>
Description of parametersDescription of the parameters passed to the Server:
Option | The value
|
---|
login | Customer Login.
|
---|
psw | Client Password (you can add or change it on this page).
|
---|
name | Contact or group name.
|
---|
grp | ID 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.
|
---|
num | The number of the group for sending messages.
|
---|
phone | List 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.
|
---|
mail | A 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_phone | Новый список номеров телефонов через любой разделитель (CHG Command).
|
---|
new_mail | New list of e-mail addresses separated by any separator (CHG Command).
|
---|
lnm | Surname.
|
---|
fnm | ID.
|
---|
mnm | Middle name.
|
---|
fio | Contact'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).
|
---|
search | Selecting contacts for the get command by contact name and / or phone number.
|
---|
after_id | Contact ID (int_id), starting from which to return the contact list (get command, fmt=3 format), except for the contact list itself.
after_id.
|
---|
bd | Дата рождения в формате дд.мм.гггг.
|
---|
myid | ID контакта, назначенный Клиентом.
|
---|
cmt | Commentary.
|
---|
tags | Теги (метки).
|
---|
pho | Other phone numbers. According to these numbers, SMS messages are not sent out.
|
---|
type | Lock 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 – группа для e-mail адресов.
|
---|
prev_id | The 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.
|
---|
cnt | The number of records returned in the Server response. The maximum value is 1000.
|
---|
fmt | Формат ответа сервера:
0 – (default) as a string (ID = 12345).
1 – as a string (12345).
2 – in xml format.
3 – in json format.
|
---|
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 value | Description
|
---|
1 | Error in parameters.
|
---|
2 | Invalid 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).
|
---|
3 | No records found.
|
---|
4 | The IP address is temporarily blocked.
|
---|
5 | Operation execution error.
|
---|
9 | Attempt 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 (создание группы):
<group>
<id>id</id>
</group> |
- when fmt = 3:
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:
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> – дата рождения в формате дд.мм.гггг.
<id> – contact Id assigned by the Client.
<comments> – commentary.
<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 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> – group name.
<number> – номер группы для рассылок.
<cnt> – 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 contactsExamples:
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.
Перечень доступных операций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 Description of parameters
Description of the parameters passed to the Server:
Option | The value
|
---|
login | Customer Login.
|
---|
psw | Client Password (you can add or change it on this page).
|
---|
user | Login subclient.
|
---|
pswc | Current password subclient.
|
---|
password | The 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.
|
---|
sum | Сумма, перечисляемая клиенту с главного аккаунта в валюте главного аккаунта.
|
---|
balance2 | Flag that sets the possibility of using the electronic balance for deposits, debits, and receiving statistics on messages.
|
---|
site_id | The site ID that will own the created subclient.
|
---|
new_login | New login subclient when you change.
|
---|
type | Account 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.
|
---|
email | Primary Email Address.
|
---|
fl[9] | Flag that sets the possibility of forwarding incoming SMS to e-mail.
|
---|
email2 | Alternative email address for forwarding incoming SMS.
|
---|
phone | Main phone number.
|
---|
fl[8] | Флаг, устанавливающий возможность пересылки входящих SMS на телефон.
|
---|
phone2 | Alternative phone number for forwarding incoming SMS messages.
|
---|
start | The start date in the period for which statistics are requested. Format: 'dd.mm.yyyy'.
|
---|
end | The end date in the period. If omitted, data from the start date is returned. Format: 'dd.mm.yyyy'.
|
---|
user_id | The ID of the subclient that is assigned automatically by the server when creating.
|
---|
reseller | Types of subclient. 0 or missing – sub-clients using the balance of the main account.
1 – the subclient with independent balance.
|
---|
hide_deleted | To 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.
|
---|
mycur | Flag that allows you to display statistics in the currency of the main account.
|
---|
fio | Initials (last name, first name, patronymic) or company name.
|
---|
props | Поле "Другие реквизиты" субклиента.
|
---|
cntr | Contract.
|
---|
tariff | The 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.).
|
---|
mintrf | The minimum fare. Determines the minimum value of the rate subclient regardless of the amount of the payment.
|
---|
curr | The 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.
|
---|
tz | Часовой пояс. По умолчанию устанавливается часовой пояс Клиента. Возможные значения:
0 – GMT-12. ... 12 – GMT+00 ... 24 – GMT+12.
|
---|
sender | Default Sender name (Sender ID) .
|
---|
sender2 | Sender's Backup name.
|
---|
fl[29] | Флаг, определяющий возможность использования списка отправителей Клиента (main Account).
|
---|
fl2[9] | Флаг, разрешающий использование более дорогих маршрутов для гарантированной доставки сообщений.
|
---|
fl2[24] | Флаг, позволяющий отправлять сначала через дешевые маршруты, при недоставке повторять через дорогие (except for mass messaging).
|
---|
fl2[12] | Флаг запрещает отправку сообщений с автоматической заменой имени отправителя.
|
---|
fl2[13] | Флаг отключает добавление имени отправителя в текст сообщений без удорожания в случае автозамены.
|
---|
nb | Balance for notifications. Upon reaching the specified amount will be sent a notification e-mail subclient.
|
---|
ktm | Данный параметр устанавливает количество дней для хранения отправленных сообщений, по истечении которых SMS-сообщения будут автоматически удаляться из истории.
|
---|
fmts | List of phone codes to which sending messages is allowed.
|
---|
notes | Comments the main account. Not available for the subclient.
|
---|
fl2[23] | Prohibition of mass and advertising mailings.
|
---|
fl[26] | Permission to use the main account's contact list.
|
---|
fl2[8] | Flag that sets the advanced mode of the personal account.
|
---|
fl[16] | Включить распознавание автоответчиков при звонках.
|
---|
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.
|
---|
ph | Список телефонов или номеров групп через запятую для выполнения рассылок по SMS-командам.
|
---|
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
|
---|
dlim | Общий лимит SMS за день. Определяет максимальное количество отправляемых за сутки сообщений.
|
---|
plim | Лимит на один номер. Устанавливает максимальное количество отправляемых за сутки сообщений на один номер телефона.
|
---|
tlim | Лимит на номер и текст. Устанавливает максимальное количество отправляемых за сутки сообщений с одним текстом на один номер телефона.
|
---|
ilim | Лимит с одного IP-адреса. Задает максимальное количество отправляемых за сутки сообщений с одного IP-адреса.
|
---|
tmlim | Диапазон времени в часах h1-h2, в который разрешено отправлять сообщения. Если текущее время меньше h1, то SMS-сообщение будет отправлено абоненту при наступлении времени h1, если текущее время попадает в промежуток от h1 до h2, то сообщение будет отправлено немедленно, в другом случае отправка будет выполнена на следующий день при достижении времени h1. Данная функция, например, полезна для того, чтобы не допустить получение SMS-сообщений абонентами в ночное время.
|
---|
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.
|
---|
vld | The maximum delivery time of messages to temporarily unavailable subscribers (min.).
|
---|
Additional parameters for autoresponders
|
---|
answ | Auto-reply to incoming SMS messages.
|
---|
answ_call | Auto-reply to incoming calls.
|
---|
fl2[4] | Disable call forwarding (to e-mail, phone and handler).
|
---|
Additional parameters for API settings
|
---|
url | http 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 (предварительно необходимо зарегистрировать IP-адрес через ONLINE-поддержку).
|
---|
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] | Включение лога API. Позволяет просматривать 20 последних http-запросов. Хранится 10 минут после последнего запроса.
|
---|
Additional parameters for E-mail2sms
|
---|
mfl[0] | Flag that allows you to disable the e-mail2sms function.
|
---|
mph | Разделенный запятой список номеров телефонов, на которые будут отправляться сообщения.
|
---|
mfl[5] | Enables the ability to specify a list of phone numbers in the message body.
|
---|
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.
|
---|
mh1 | The 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..
|
---|
mh2 | The final value of the time range for sending incoming emails.
|
---|
mlen | Максимальная длина сообщения, до которой обрезается входящее письмо при отправке в виде SMS-сообщения (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 value | Description
|
---|
1 | Error in parameters.
|
---|
2 | Invalid 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).
|
---|
3 | No records found.
|
---|
4 | The IP address is temporarily blocked.
|
---|
5 | Operation execution error.
|
---|
6 | The subclient with the specified login does not exist.
|
---|
7 | A 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.
|
---|
8 | Error when saving a record.
|
---|
9 | Attempt 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).
|
---|
10 | Insufficient 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:
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:
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 the subclientExamples:
Create a subclient with login "mylogin", password "mypassword", phone number 79999999999 and permission to use
sender (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
Change subclient with login "mylogin" to "mylogin2" type of customer "Tariff and the balance of the main account" and install
codes allowed to send 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
Obtaining statistics on the subclient with the username "sub_alex":
https://smscentre.com/sys/users.php?get_stat=1&login=alex&psw=123&user=sub_alex
Obtaining statistics on the independent subclient in the currency of the main account with "01.01.2014" "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 reportsTo 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:
Option | The value
|
---|
login | Customer Login.
|
---|
psw | Client Password (you can add or change it on this page).
|
---|
user | The username of the sub-client to create or upload an invoice for. You can use the user_id parameter instead of this parameter.
|
---|
user_id | ID of the sub-client to create or upload an invoice for. You can use the user parameter instead of this parameter.
|
---|
sum | The amount to create an account for in the Client's currency.
|
---|
service | Name of the service specified when creating the invoice.
|
---|
id | ID of the requested invoice or act.
|
---|
num | Number 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 value | Description
|
---|
1 | Error in parameters.
|
---|
2 | Invalid 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).
|
---|
4 | The IP address is temporarily blocked.
|
---|
5 | Ошибка создания счета.
|
---|
6 | Sublogin not found.
|
---|
7 | The specified document was not found.
|
---|
9 | Attempt 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 namesTo 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>
При добавлении или изменении имени отправителя в теле запроса можно передавать файл документа для операторов (свидетельство на товарный знак, сертификат на домен) в формате jpg, tif, pdf, png, zip, rar. Максимальный размер передаваемого файла не должен превышать 3 Мб. Комментарий к документу может быть указан в дополнительном параметре doc_info.
Description of parameters
Description of the parameters passed to the Server:
Option | The value
|
---|
login | Customer Login.
|
---|
psw | Client Password (you can add or change it on this page).
|
---|
all | 0 (default) - get a list of activated sender names.
1 – get a complete list of sender names.
|
---|
sender | The sender name that is being created or deleted.
|
---|
mts_step | 1 – register a paid name with the MTS operator.
|
---|
sber_step | 1 – зарегистрировать платное имя у оператора СберМобайл.
|
---|
tele2 | 1 – register a name with the Tele2 operator at the tariff with free names.
|
---|
motiv | 1 – зарегистрировать имя у оператора МОТИВ по тарифу с бесплатными именами.
|
---|
mega_step | 1 – register a paid name with the Megafon operator.
|
---|
bee_step | 1 – register a paid name with the Beeline operator.
|
---|
motiv_step | 1 – register a paid name with the MOTIV operator.
|
---|
tele2_step | 1 – register a paid name with a Tele2 operator.
|
---|
mega_int | 1 – enable replacement with a common name for the Megafon operator.
|
---|
motiv_int | 1 – enable replacement with a common name for the Motive operator.
|
---|
mts_int | 1 – enable replacement with a common name for the MTS operator.
|
---|
ua_reg | 1 – 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 – Site address (optional parameter).
email – E-mail для связи.
address – Actual address.
desc – Description of the services provided by the sender.
subj – Subject (purpose of informing).
|
---|
ua_int | 1 – register a name for Ukraine at a higher rate for international traffic.
|
---|
id | ID of the sender's name, assigned by the Server
automatically when creating a new name.
|
---|
cmt | Comment specified when creating the sender name.
|
---|
mail | 1 – add the sender's e-mail address.
|
---|
name | Комментарий, связанный с параметром mail (usually the name of the owner of the e-mail address).
|
---|
code | Code for confirming the sender's digital name.
|
---|
site | The 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_name | The site address specified in the text of the message with the confirmation code.
|
---|
user | The user ID of the subclient to which you apply the specified command.
|
---|
operators | 1 – add the status code of the sender's name from the operator to the response.
|
---|
from_date | Select 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_id | A 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.
|
---|
cnt | Количество имен отправителей возвращаемых при запросе списка имен. Максимальное значение равно 15000.
|
---|
doc_info | If 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.
|
---|
charset | Encoding of transmitted parameters.
|
---|
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 value | Description
|
---|
1 | Error in parameters.
|
---|
2 | Invalid 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).
|
---|
3 | Sender name not found.
|
---|
4 | The IP address is temporarily blocked.
|
---|
5 | Error saving or deleting the sender's name.
|
---|
7 | Invalid number format.
|
---|
8 | The confirmation code cannot be delivered to the specified number.
|
---|
9 | Attempt 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).
|
---|
10 | The code has already been sent to the specified number. Retry is possible after 8 hours.
|
---|
11 | Invalid 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:
- при fmt = 0 и all = 0:
name = <sender>, id = <id>
... |
- при fmt = 1 и all = 0:
- при fmt = 2 и all = 0:
<list>
<sender id="<id>">sender</sender>
...
</list>
|
- при fmt = 3 и all = 0:
[{
"sender": "<sender>",
"id": <id>
},
...] |
- при fmt = 0 и all = 1:
name = <sender>, status = <status>, id = <id>
... |
- при fmt = 1 и all = 1:
<sender>,<status>,<id>
... |
- при fmt = 2 и all = 1:
<list>
<sender status="<status>" id="<id>">sender</sender>
...
</list>
|
- при fmt = 3 и 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>,
mts_step = <mts_step_status>, tele2_step = <tele2_step_status>, tele2 = <tele2_status>, motiv = <motiv_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>, id = <id>
... |
- with fmt = 2 and operators = 1:
<list>
<sender mega_step="<mega_step_status>" mega_int="<mega_int_status>" bee_step="<bee_step_status>" motiv_step="<motiv_step_status>" motiv_int="<motiv_int_status>" sber_step="<sber_step_status>" mts_step="<mts_step_status>" mts_int="<mts_int_status>" tele2_step="<tele2_step_status>" tele2="<tele2_status>" motiv="<motiv_status>" ua_reg="<ua_reg_status>" ua_int="<ua_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_step": "<motiv_step_status>",
"motiv_int": "<motiv_int_status>",
"sber_step": "<sber_step_status>",
"mts_step": "<mts_step_status>",
"mts_int": "<mts_int_status>",
"tele2_step": "<tele2_step_status>",
"tele2": "<tele2_status>",
"motiv": "<motiv_status>",
"ua_reg": "<ua_reg_status>",
"ua_int": "<ua_int_status>",
"id": "<id>"
},
...] |
Where:
<sender> – registered and approved sender name.
<mega_status>(up to 01.01.2022), <mts_status>(up to 01.12.2017), <mega_step_status>, <mega_int_status>, <bee_step_status>, <motiv_step_status>, <motiv_int_status>, <sber_step_status>, <mts_step_status>, <mts_int_status>, <tele2_step_status>, <tele2_status>, <motiv_status>, <ua_reg_status>, <ua_int_status> – код
статуса имени отправителя у соответствующего оператора
(0 - ожидает регистрации, 1 - отправлено на регистрацию, 2 - допущено оператором, 3 - не принято оператором, 4 - временно отключено,
5 - недостаточно средств на счете, 8 - необходимы подтверждающие документы).
<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:
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:
Examples of actions with sender namesExamples:
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
Удаление имени отправителя:
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 messagesTo 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:
Option | The value
|
---|
login | Customer Login.
|
---|
psw | Client Password (you can add or change it on this page).
|
---|
start | The 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.
|
---|
end | The end date in the period. If omitted, data from the start date is returned. Format: 'dd.mm.yyyy'.
|
---|
phone | The number or comma-separated list of phone numbers for which you need to get
the history of sent SMS messages.
|
---|
email | E-mail address or a comma-separated list of addresses for which you need to get
the history of sent e-mail messages.
|
---|
format | Flag for requesting e-mail messages.
0 (default) - request SMS messages. 8 – request for e-mail messages.
|
---|
cnt | The number of messages returned in the response. The maximum value is 1000.
|
---|
prev_id | The 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.
|
---|
fmt | Формат ответа Сервера.
0 – (by default) as a string (more details can be found in the description below).
1 – вернуть ответ в виде параметров через запятую.
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 value | Description
|
---|
1 | Error in parameters.
|
---|
2 | Invalid 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).
|
---|
3 | Message not found.
|
---|
4 | The IP address is temporarily blocked.
|
---|
9 | Attempt 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:
Option | The value
|
---|
login | Customer Login.
|
---|
psw | Client Password (you can add or change it on this page).
|
---|
cnt | The number of messages returned in the response. The maximum value is 10000.
|
---|
hour | The period in hours for which to request incoming messages. Maximum number of hours - 168 (7 days).
|
---|
after_id | ID of the message from which to return incoming messages, with the exception of the message itself.
after_id.
|
---|
to_phone | The phone number of the Client to which the 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 value | Description
|
---|
1 | Error in parameters.
|
---|
2 | Invalid 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).
|
---|
4 | The IP address is temporarily blocked.
|
---|
9 | Attempt 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 statisticsTo 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:
Option | The value
|
---|
login | Customer Login.
|
---|
psw | Client Password (you can add or change it on this page).
|
---|
start | The start date in the period for which statistics are requested. Format: 'dd.mm.yyyy'.
|
---|
end | The end date in the period. If omitted, data from the start date is returned. Format: 'dd.mm.yyyy'.
|
---|
mycur | Flag that allows you to display statistics in the current currency of the Client.
|
---|
balance2 | Flag 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 value | Description
|
---|
1 | Error in parameters.
|
---|
2 | Invalid 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).
|
---|
4 | The IP address is temporarily blocked.
|
---|
9 | Attempt 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 ratesTo 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:
Option | The value
|
---|
login | Customer Login.
|
---|
psw | Client Password (you can add or change 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 value | Description
|
---|
1 | Error in parameters.
|
---|
2 | Invalid 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).
|
---|
4 | The IP address is temporarily blocked.
|
---|
9 | Attempt 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 operatorTo get information about the subscriber's operator, 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:
Option | The value
|
---|
login | Customer Login.
|
---|
psw | Client Password (you can add or change it on this page).
|
---|
phone | The 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 value | Description
|
---|
1 | Error in parameters.
|
---|
2 | Invalid 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).
|
---|
3 | Operator not found.
|
---|
4 | The IP address is temporarily blocked.
|
---|
9 | Attempt to send more than three identical requests or any 100 requests to get
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 for a minute to get data about the operator to reduce
the load on the database.
Getting data about a short linkTo 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:
Option | The value
|
---|
login | Customer Login.
|
---|
psw | Client Password (you can add or change it on this page).
|
---|
link | Original full Link.
|
---|
id | ID of the short link. Assigned automatically when created.
|
---|
Все параметры, которые содержат специальные символы (плюс, пробел, символы кириллицы и т.д.), должны быть закодированы при помощи функции urlencode для передачи в HTTP-запросе.
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 value | Description
|
---|
1 | Error in parameters.
|
---|
2 | Invalid 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).
|
---|
3 | Link not found.
|
---|
4 | The IP address is temporarily blocked.
|
---|
9 | Attempt 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 messagesYou 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:
Option | The value
|
---|
login | Customer Login.
|
---|
psw | Client Password (you can add or change it on this page).
|
---|
phone | Подключаемый номер.
|
---|
noprolong | Indicates 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 value | Description
|
---|
1 | Error in parameters.
|
---|
2 | Invalid 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).
|
---|
3 | Недостаточно средств на счете для аренды номера.
|
---|
4 | The IP address is temporarily blocked.
|
---|
9 | Attempt 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.
Для аренды номера:
- when fmt = 0: cost = <cost>
- when fmt = 1: <cost>
- when fmt = 2:
<phone>
<cost>cost</cost>
</phone>
|
- when fmt = 3:
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:
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 handlerIn 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 (для fmt=2 и fmt=3 параметры передаются в теле запроса).
Transmitted parameters for the SMS message status:
Option | The value
|
---|
id | Message ID.
|
---|
phone | Phone number.
|
---|
status | Message status.
|
---|
time | Time 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).
|
---|
ts | Time to change the status in the form of a stamp in seconds.
|
---|
err | Error code if the message cannot be delivered (list). Passed if not equal to zero.
|
---|
syserr | Additional error from the operator, not always present.
|
---|
cnt | The number of parts (when sending an SMS message) or the number of seconds (when sending a voice message (call)).
|
---|
type | Message type (0 – SMS, 1 – Flash-SMS, 2 – Бинарное SMS, 3 – Wap-push, 4 – HLR-запрос, 5 – Ping-SMS, 6 – MMS, 7 –
Звонок, 10 – Viber, 12 – Соцсети).
|
---|
cost | Message cost.
|
---|
flag | 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.
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.
|
---|
sender | The sender's name displayed on the recipient's phone.
|
---|
dtmf | The sequence of characters typed by the subscriber on the numeric keypad while listening to a voice message (phone call).
|
---|
cmt | Комментарии клиента, передаваемые при отправке сообщения. В случае возникновения overtime при голосовом сообщении он будет передан
в комментарии отдельной строкой в виде "overtime: mm:ss".
|
---|
md5 | MD5-хеш строки "id:phone:status:<секретная строка>". Passed if it was specified as an additional parameter
in the http (s) address of the handler.
|
---|
sha1 | sha1-хеш строки "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
|
---|
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.
|
---|
Transmitted parameters for an incoming SMS message:
Option | The value
|
---|
id | Unique ID of the incoming message, assigned by the Server automatically.
|
---|
sms_id | Идентификатор сообщения, на которое получен ответ. Данный параметр отсутствует, если сообщение от абонента было отправлено на выделенный входящий номер либо при указании абонентом префикса "логин, двоеточие и пробел".
|
---|
phone | Subscriber's phone number.
|
---|
mes | Text of the SMS message.
|
---|
to | The incoming phone number to which the message was sent by the subscriber.
|
---|
smsc | SMS-центр оператора, от которого было получено входящее сообщение.
|
---|
sent | Sending a message to the subscriber in the form of a stamp in seconds.
|
---|
time | The time when the message was received by the Server in the form of a stamp in seconds.
|
---|
md5 | MD5-хеш строки "phone:mes:to:<секретная строка>". Passed if it was specified as an additional parameter
in the http (s) address of the handler.
|
---|
sha1 | sha1-хеш строки "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":
Option | The value
|
---|
waitcall | 1 – service message flag for the service " Number confirmation with a call".
|
---|
phone | The phone number of the subscriber from whom the call was received.
|
---|
ts | Call time.
|
---|
md5 | MD5-хеш строки "phone:ts:<секретная строка>". Passed if it was specified as an additional parameter
in the http (s) address of the handler.
|
---|
sha1 | sha1-хеш строки "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:
Option | The 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.
|
---|
callmenu | The sequence of keys on the phone's numeric keypad that the caller pressed while navigating through the voice menu.
|
---|
ringtime | Waiting 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 siteSometimes 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 callFor 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:
Option | The value
|
---|
login | Customer Login.
|
---|
psw | Client Password (you can add or change it on this page).
|
---|
phone | The 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 value | Description
|
---|
1 | Error in parameters.
|
---|
2 | Invalid 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).
|
---|
3 | Insufficient funds on the Client's account.
|
---|
4 | The IP address is temporarily blocked.
|
---|
5 | The specified phone number of the subscriber is in the black list of the Client.
|
---|
9 | Attempt 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.
|