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

Integration with the service (API)

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


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

SENDING MESSAGES

MANAGING MAILING LISTS

MESSAGE STATUSES

CHECKING THE BALANCE STATUS

CONTACT MANAGEMENT

CLIENT MANAGEMENT

MANAGING SENDER NAMES (SENDER ID)

GETTING DATA

VARIOUS

Transmitting statuses and messages to the Client handler

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

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

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

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

All parameters are passed by the POST method.

Transmitted parameters for the SMS message status:

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

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

Bit 5 – payment of the message from the second balance.
Bit 8 - indicates a template message.
senderThe sender's name displayed on the recipient's phone.
dtmfThe sequence of characters typed by the subscriber on the numeric keypad while listening to a voice message (phone call).
md5MD5-хеш строки "id:phone:status:<секретная строка>". Passed if it was specified as an additional parameter in the http (s) address of the handler.
sha1sha1-хеш строки "id:phone:status:<секретная строка>". Passed if it was specified as an additional parameter in the http (s) address of the handler.
crc32Контрольная сумма crc32 строки "id:phone:status:<секретная строка>". Passed if it was specified as an additional parameter in the http (s) address of the handler.
Additional parameters for HLR requests
imsiUnique IMSI code of the subscriber's SIM card.
mscThe number of the service center of the operator in whose network the subscriber is located.
mccNumeric code of the subscriber's country.
mncNumeric code of the subscriber's operator.
cnName of the country of registration of the subscriber.
netName of the subscriber registration operator.
rcnThe name of the roaming country of the subscriber when he is in a foreign network.
rnetThe name of the roaming operator of the subscriber when he is in someone else's network.

Transmitted parameters for an incoming SMS message:

OptionThe value
idUnique ID of the incoming message, assigned by the Server automatically.
sms_idID of the message to which the response was received. This parameter is omitted if the message from the subscriber was sent to a dedicated incoming number or if the subscriber specifies the prefix " login, colon and space".
phoneSubscriber's phone number.
mesText of the SMS message.
toThe incoming phone number to which the message was sent by the subscriber.
smscSMS center of the operator from which the incoming message was received.
sentSending a message to the subscriber in the form of a stamp in seconds.
timeThe time when the message was received by the Server in the form of a stamp in seconds.
md5MD5-хеш строки "phone:mes:to:<секретная строка>". Passed if it was specified as an additional parameter in the http (s) address of the handler.
sha1sha1-хеш строки "phone:mes:to:<секретная строка>". Passed if it was specified as an additional parameter in the http (s) address of the handler.
crc32Контрольная сумма crc32 строки "phone:mes:to:<секретная строка>". Passed if it was specified as an additional parameter in the http (s) address of the handler.

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

OptionThe value
waitcall1 – service message flag for the service " Number confirmation with a call".
phoneThe phone number of the subscriber from whom the call was received.
tsCall time.
md5MD5-хеш строки "phone:ts:<секретная строка>". Passed if it was specified as an additional parameter in the http (s) address of the handler.
sha1sha1-хеш строки "phone:ts:<секретная строка>". Passed if it was specified as an additional parameter in the http (s) address of the handler.
crc32Контрольная сумма crc32 строки "phone:ts:<секретная строка>". Passed if it was specified as an additional parameter in the http (s) address of the handler.

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

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

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

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

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

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




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