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.
To check the SMS delivery status, use the get_status and get_status2 methods.
In the get_status2 method, you can add additional parameters.
$client = new SoapClient ('https://smscentre.com/sys/soap.php?wsdl'); $ret = $client->get_status(array('login'=>'alex', 'psw'=>'123', 'phone'=>'79999999999', 'id'=>'999', 'all'=>'0'));
The following parameters are passed to the server:
Client Password (you can add or change it on this page).
0 Ц (by default) get the status of the message in the usual format.
1 Ц get full information about the sent message.
2 Ц add information about the operator and the subscriber's region to the message information.
A string of additional parameters (only in get_status2)
passed in the format: 'parameter_1=value_1¶meter_2=value_2'.
The date of the last status change. Format DD.MM.YYYY hh: mm: ss.
Error code if the message cannot be delivered (list).
Error code if the status cannot be requested.
all = 1
Date the message was sent (format DD.MM.YYYY hh: mm: ss).
Subscriber's phone number.
The text of the message.
Number of parts in an SMS message (or seconds in a voice message).
all = 2
The name of the operator of the subscriber.
Region of registration of the subscriber number.
The error codecan take the following values:
Error in parameters.
Invalid 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).
Message not found.
The IP address is temporarily blocked.
Attempt to send more than five status requests for the same message within a minute.