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

Integration with the service (API)

The API allows you to send messages through your projects and services over the HTTP/HTTPS, SMTP, and SMPP protocols. Ready-made libraries in different programming languages connect to your project and help you send messages from anywhere with a single command.


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

Sending a message

ƒл€ отправки SMS необходимо послать e-mail на адрес sendsend.smscentre.com с текстом в формате: <login>:<psw>:<id>:<time>,<tz>:<translit>,<format>,<sender>,<test>:<phones>:<mes> or: <login>:<psw>:<id>:<time>,<tz>:<translit>,<format>,<sender>,<test>::<list>
It is possible to use our SMTP server directly. Address: send.smscentre.com. Authorization is not required.

The message must be transmitted in plain text with the encoding specified, by default koi8-r. The encoding is set in the Content-Type header (Content-Type: text/plain; charset="CHARSET"). The maximum email size is 100 KB.

If it is not possible to transmit the text of the message with "Content-Type: text/plain", it is necessary to enclose the text in special tags "[text]message text[/text]".

Description of the parameters passed to the Server :

OptionThe value
loginCustomer Login.
pswClient Password (you can add or change it on this page).
phonesThe number or comma-separated or semicolon-separated list of mobile phone numbers in international format to which the message is sent. Numbers can be passed without the "+ " sign. If the number is passed without the " + " sign, it can be corrected by automatic formatting and converted to the correct international format. Thus, some errors when entering phone numbers can be corrected automatically. To disable auto-correction, pass the number with the "+ " sign.".
You can also send a message to a group of numbersby specifying a special code " G<номер группы>". The message will be sent to all numbers belonging to this group. For an e-mail message, a list of recipients' e-mail addresses is transmitted .
mesThe text of the message being sent. The maximum size is 1000 characters. If necessary, the message will be divided into several SMS messages sent to the subscriber and paid separately. Size of one SMS Ц 160 characters in Latin or 70 characters in Cyrillic. When splitting a message into multiple SMS messages, a header is added to each part to combine the parts into a single message on the recipient's phone, and the maximum length becomes 67 for Cyrillic and 153 for Latin letters. You can add comments to the message text that are intended for the sender to view the history in the personal account.
Additional options
idThe message ID. Assigned by the Client. Serves for further identification of the message. If not specified, it will be assigned automatically. Not necessarily unique. The identifier is a 32-bit number in the range from 1 to 2147483647, or a string up to 40 characters long consisting of Latin letters, numbers, and symbols ."-_".
senderThe sender's name displayed on the recipient's phone. English letters, numbers, spaces, and some characters are allowed. Length Ц 11 characters or 15 digits. All names are registered in your personal account on this page.
translitA sign that the message you want to translate in translit.
0 (default) Ц do not translate into transliteration.
1 Ц translate to translit as " translate".
2 Ц translate into transliteration as " mpaHc/Ium".
timeThe time of sending the SMS message to the subscriber.
Formats:
  1. DDMMYYhhmm или DD.MM.YY hh.mm.
  2. h1-h2. Sets the time range in hours. If the current time is less than h1, the SMS message will be sent to the subscriber when the time h1 occurs, if the current time falls in the interval from h1 to h2, that message will be sent immediately, otherwise the message will be sent the next day when the h1 time is reached. This function, for example, is useful in order to prevent subscribers from receiving SMS messages at night.
  3. 0ts, where ts is timestamp, the time in seconds since January 1, 1970.
  4. +m. Sets the relative time offset from the current time in minutes. The + character must be encoded as %2B in the http request.
If time = 0 or the time already elapsed is specified, the message will be sent immediately.
tzThe time zone in which the time parameter is set. It is indicated relative to Moscow time. The tz parameter can be either positive or negative. If tz is equal to 0, the Moscow time zone will be used , if the tz parameter is not set, the time zone will be taken from the Client settings.
formatќпредел€ет тип SMS-сообщени€.
0 (default) Ц plain text message.
1 Ц flash-sms. A message displayed immediately on the phone screen.
2 Ц wap-push. A message containing a link to the site, the first line specifies the link, the second Ц the name.
3 Ц hlr request. Allows you to get information about the number from the operator's database without sending SMS.
4 Ц бинарное сообщение в двоичном виде.
5 Ц binary message, represented as a hexadecimal string (hex).
6 Ц ping-sms. Checking the number for availability by sending a special invisible SMS.
7 Ц mms. A message that allows you to transmit text (txt), images of various formats (jpg, gif, png), music (wav, amr, mp3, mid) and video (mp4, 3gp).
8 Ц e-mail. An email message. The subject of the letter is indicated at the end of the message text through a line feed in the form "subj:Theme". Specifying the subject, text and e-mail of the sender is mandatory.
9 Ц voice message (call). The voice used for voice-over is indicated at the end of the message text through a line feed in the form of "voice:The voice." Possible types of voices are described in detail on this page.
10 Ц viber-a message sent to users of the Viber messenger.
11 Ц whatsapp is a message sent to WhatsApp messenger users.
12 Ц soc-a message sent to users of the Odnoklassniki, VKontakte, or Mail.Ru Agent social networks.
testIndicates the need to send a response message with the result of sending an SMS message. If 0 or not specified, the response is sent only if there is an error in the parameters, if 1, the response is sent in any case. This parameter is used for debugging during the initial configuration of the service.
listA list of phone numbers and their corresponding messages, separated by a colon or semicolon, and presented as:
phones1:mes1
phones2:mes2
...
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, pass a value equal to 2 in the test parameter.
The list parameter allows you to send multiple messages with different messages to multiple phones with a single request. The messages in the request are assigned a single identifier. Some parameters (for example, subj, voice) are passed at the end of the list message list via a line feed.


The parameters must go strictly in the specified order. Login, psw are required, phones and mes. If some optional parameter is missing, then the colon must remain.

Example (<id><id>, field <time><time>,<tz><tz> and field <translate><translate>,<format><format>,<sender><sender>,<test><test> are not specified):

alex:123::::79999999999:message

In the composite field <translate><translate>,<format><format>,<sender><sender>,<test><test>, any parameter can be omitted, keeping the initial comma.

Examples:

alex: psw:::1,1, Alex:79999999999: message
alex: psw:::1:79999999999: message
alex: psw:::, 1:79999999999: message
alex: psw:::, 1, Alex:79999999999: message
alex: psw:::,1,, 1:79999999999: message

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

Supported prefixes:

NameDescription
__CALL__: messageSending a voice message (call). When sending a voice message, at the end of the text, you can specify a special combination "\n~~~\n" (line feed, 3 of the tilde character, and again line feed), after which you can pass the param parameter that determines some characteristics of the call (for more information, see the description).
__VIBER__: messageќтправка сообщени€ пользовател€м мессенджера Viber.
__SOC__: message Sending a message to users of the social networks "Odnoklassniki", "VKontakte" or users of " Mail.Ru Agent".
__PING__Sending a special SMS that is not displayed in the phone to check the numbers for availability in real time by the delivery status.
__HLR__A sign of the HLR-request for information about the number from the operator's database without sending real SMS.


If an error was made in the parameters or any other error occurred, and the test parameter was requested for a response, it will be as follows:
  • ERROR = N (description) Ц for 1,2,4,5,9 errors;

  • ERROR = N (описание), ID - <id сообщени€> Ц дл€ ошибок 3,6,7,8.
N Ц error number, can take the following values:

The valueDescription
1Error in parameters.
2Invalid username or password. Also occurs when trying to send a message from an IP address that is not included in the list of allowed by the Client (if such a list was previously configured by the Client).
3Insufficient funds in Customer account.
4IP address is temporarily blocked due to frequent errors in the queries. read More
5Invalid date format.
6Denied message (by text or by sender name).
7Invalid phone number format.
8The message to the specified number can not be delivered.
9Sending more than one identical request for the transmission of SMS messages within minutes.

If the message is successfully accepted and the response request is requested, the test parameter returns a string of the following format:
  • OK - <n> SMS, ID - <id>
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.

The server does not accept more than two identical requests 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 waste 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 2 minutes, 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.




© 2003Ц2023 SMS Center LLC
License no. 166255
support@smscentre.com
Contacts
Design Ч Artemy Lebedev Studio
Site Information
SMS Center for Android Yandex. Metrica