|
8 (800) 700 7672 Free in Russia |
The API allows you to send messages through your projects and services over HTTP/HTTPS, SMTP and SMPP protocols. Ready-made libraries in different programming languages connect to your project and help you send messages from anywhere with a single command. For simplified authorization, instead of a login and password pair, you can use a special API key.
CONNECTION THE SPEED OF MAILING LISTS MULTIPLE CONNECTIONS SENDING A MESSAGE Sending an SMS message CHECKING THE STATUSComments in SMS messages Sending an e-mail message Sending a voice message (call) Sending a viber message Sending a soc message Sending a message to Telegram Sending a message to the Telegram chatbot Sending an HLR request RECEIVING INCOMING MESSAGES ERROR CODES IN THE STATUS | Sending a messageSending an SMS messageTo send an SMS message, use the SUBMIT_SM command according to the specification.The following encodings are supported:
To use the ISO-8859-1 (ASCII) encoding instead of GSM when connecting, you need to specify:
system-type = "ISO"
You can add comments to the text of the SMS message , which are intended for the sender to view the message history in the personal account. The SUBMIT_MULTI command for multiple mailing is not yet implemented. The server does not accept more than one identical request to send SMS messages within a minute to protect against errors and loops in the Client-side program in order to reduce the load and not waste the Client's funds, as well as to prevent multiple messages from being sent to one subscriber.
Comments in SMS messagesWhen 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. Sending an e-mail messageTo send an e-mail message, use the SUBMIT_SM command with the text " _ _ MAIL__: <message><message>\nsubj:<subject>" (text "_ _ MAIL__", colon, space, message text, line feed, word "subj", colon, subject of the e-mail message).Sending a voice message (call)To send a voice message, use the SUBMIT_SM command with the text " __CALL__: <message><message>\nvoice:<voice><voice>" (text "__CALL__", colon, space, message text, line feed, word "voice", colon, voice used to voice the text).Possible values for the voice used:
In the process of forming a message, at the end of the text, you can specify a special combination "\n~~~\n" (line feed, 3 tilde character and line feed again), after which you pass the param parameter, which determines some characteristics of the call (more details can be found in the description). Sending a viber messageTo send a viber message, use the SUBMIT_SM command with the text "__VIBER__: <message>" (text "__VIBER__", colon, space, message text).When forming the message text, you can use special macros to create a button that will open the browser and click on the link specified in the macro, as well as attach files. More details additional features for sending viber messages are described in the documentation for the http protocol. Sending a soc messageTo send a soc message sent to users of the Odnoklassniki, VKontakte, or Mail.Ru Agent social networks, use the SUBMIT_SM command with the text "__SOC__: <message>" (text " _ _ SOC__", colon, space, message text).Sending a message to TelegramTo send the confirmation code to Telegram, use the SUBMIT_SM command with the text "__TGM__: <code>" (text "__TGM__", colon, space, confirmation code).Only numeric codes with a length from 4 to 8 digits are accepted for sending. Sending a message to the Telegram chatbotTo send a message to the Telegram chatbot, use the SUBMIT_SM command with the text "__BOT__: <message>\nbot:@<bot_name>" (text "__BOT__", colon, space, message text, line feed, text "bot", colon, bot name).Sending an HLR requestTo send an HLR request, use the SUBMIT_SM command with the text __HLR__. The result of the request comes in the usual status (Delivery Report), which can be received both via the SMPP connection and via HTTP to your handler.Status format with the result of an HLR request returned by SMPP:
id:<id> stat:<status> err:<err> imsi:<imsi> msc:<msc> mcc:<mcc> mnc:<mnc> cn:<cn> net:<net> rcn:<rcn> rnet:<rnet>
Description of parameters:
String data, such as country and operator, is encoded via the urlencode function. Example of the result of an HLR request:
id:855469 stat:DELIVRD err:000 imsi:250023012345678
Sample PHP code for parsing a string with the result of an HLR request: $dlr = strtr($dlr, ": ", "=&"); // $dlr - ñòðîêà ñòàòóñà
Example of parsing through regular expressions: preg_match("/^id:(\d+) stat:(\w+) err:(\d+) imsi:(\d*) msc:(\d*) mcc:(\d*) mnc:(\d*) cn:([^ ]*) net:([^ ]*) rcn:([^ ]*) rnet:([^ ]*)/", $dlr, $m); // $dlr - ñòðîêà ñòàòóñà
To send a Ping-SMS, use the SUBMIT_SM command with the text _ _ PING__. |
© 2003–2024 SMS Center LLC | support@smscentre.com Contacts | Design — Artemy Lebedev Studio Site Information |