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

Checking the status

You can get the delivery status of a sent SMS message via the SMPP protocol either automatically by receiving the DELIVER_SM response PDU command from the server immediately after the status change, or by using a separate QUERY_SM command on request. To automatically get the status via the SMPP protocol, you need to connect in the following mode: transceiver or receiver and when sending SMS, specify the status request flag (registered_delivery). If you do not specify this flag when sending, the message statuses will be passed to the HTTP handler.

When the status is automatically returned, the DELIVER_SM command passes the standard TLV parameters recipted_message_id (<id>), message_state (numeric <status>) and network_error_code (<err>), as well as additional TLV fields described below:

Field name (code)SizeTypeDescription
8192 (0x2000)Var. max 6COctet StringThe cost of the message in the format " n.nnnn".
8193 (0x2001)2IntegerA 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.
8194 (0x2002)2IntegerNumber of parts per message.
8195 (0x2003)Var. max 5COctet Stringmccmnc Subscriber's country/operator code.
8196 (0x2004)2IntegerAdditional message status (2 – read, 4 – link clicked).

The DELIVER_SM command also passes the status text in the following format:
id:<id> sub:<sub> dlvrd:<dlvrd> submit date:<submit date> done date:<done date> stat:<status> err:<err>
Description of parameters:

OptionThe value
idThe message ID assigned by the server when sending the message.
subThe number of SMS parts in the sent message.
dlvrdNumber of SMS delivered.
submit dateDate sent.
done dateDate of status change.
statusThe status of the message in the form of a string (DELIVRD, EXPIRED, UNDELIV).
errError code if the message cannot be delivered (list).

Example of the result of the status bar (Delivery Report): id:854019 sub:001 dlvrd:001 submit date:1108202241 done date:1108202241 stat:DELIVRD err:000

By default, for long messages that are split into multiple SMS messages, the server returns only one status (DELIVER_SM) for the entire glued message and the same ID in the SUBMIT_SM_RESP response for all SMS parts of this message. To enable the processing mode and return statuses for each SMS part, set the following parameter separately in the connection settings (or in the settings of your personal account): system-type = "SINGLE"
If you need to specify several parameters in the system-type field, then specify them separated by commas: system-type = "ISO,SINGLE"



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