|
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.
MESSAGES SENDING Sending an SMS message MANAGING MAILING LISTSComments in SMS messages Sending to a group of numbers Sending an HLR request Sending an e-mail message Sending a voice message (call) Sending a viber message Sending a message to Telegram Sending a message to the Telegram chatbot Using prefixes when sending messages Managing message templates Managing operator templates Virtual sending (test mode) Event Notifications MESSAGE STATUSES Checking the status CHECKING THE BALANCE STATUSMessage statuses. Server response and error codes Status codes Error codes in the status Deleting a message MANAGING CONTACTS Actions with contacts and groups CLIENT MANAGEMENTContacts and groups. Server response and error codes Examples of operations with contacts Work with the subclient MANAGING SENDER NAMES (SENDER ID)Creating and uploading invoices and reports List of available operations with sender names GETTING DATAServer response and error codes Examples of actions with sender names Getting the history of sent messages VARIOUSReceiving incoming messages Getting statistics Request for rates Getting information about the operator Getting data about a short link Connecting dedicated numbers for receiving messages Transmitting statuses and messages to the Client handler Connecting anti-spam verification (captcha) to the site Confirm your phone number with a call Actions with deferred tasks | 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
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
in the form of:
?md5=<секретная строка>
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 (for fmt=2 and fmt=3, the parameters are passed in the request body). If it is necessary to transfer the parameters specified in the handler URL by the GET method, you need to register them in a special way through the "!" symbol (for example, in the URL "https://mysite.ru/!param1¶m2?param3¶m4" parameters param1 and param2 will be transmitted by the GET method, and param3 and param4 by the POST method). Transmitted parameters for the SMS message status:
Transmitted parameters for an incoming SMS message:
Transmitted parameters when using the service " Number confirmation with a call":
Additional parameters transmitted when using the voice menu function in calls:
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"])) {
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. |
© 2003–2024 SMS Center LLC | support@smscentre.com Contacts | Design — Artemy Lebedev Studio Site Information |