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

Server response and error codes

The server sends the response as a string:

If an error occurred, the response will be one of the following:

When fmt = 0:
  • ERROR = N (description) Ц for 1,2,4,5,9 errors;

  • ERROR = N (description), ID - <id сообщени€> Ц for 3 errors,6,7,8.
When fmt = 1:
  • 0,-N Ц for errors 1,2,4,5,9;
  • <id сообщени€>,-N Ц for 3 errors,6,7,8.
When fmt = 2:
  • For 1 errors,2,4,5,9:

    <result>
    <error>description</error>
    <error_code>N</error_code>
    </result>

  • For 3 errors,6,7,8:
    <result>
    <error>description</error>
    <error_code>N</error_code>
    <id>id сообщени€</id>
    </result>
When fmt = 3:
  • For 1 errors,2,4,5,9:
    {
    "error": "description",
    "error_code": N
    }

  • For 3 errors,6,7,8:
    {
    "error": "description",
    "error_code": N,
    "id": <id сообщени€>
    }
N Ц error number, can take the following values:

The valueDescription
1Error in parameters.
2Invalid 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).
3Insufficient funds on the Client's account.
4IP address is temporarily blocked due to frequent errors in the queries. read More
5Invalid date format.
6The message is forbidden (by text or by the sender's name). This error also occurs when you try to send mass and / or advertising messages without a signed contract.
7Invalid phone number format.
8The message to the specified number can not be delivered.
9Sending more than one identical SMS message request or more than five identical requests to receive the cost of a message within a minute.
This error also occurs when you try to send fifteen or more requests simultaneously from different connections under the same username (too many concurrent requests).

If the request is processed successfully, a string of the following format is returned:
  • when cost = 0 and fmt = 0: OK - <n> SMS, ID - <id>

  • when cost = 1 and fmt = 0: <cost> (<n> SMS)

  • when cost = 2 and fmt = 0: OK - <n> SMS, ID - <id>, COST - <cost>

  • when cost = 3 and fmt = 0: OK - <n> SMS, ID - <id>, COST - <cost>, BALANCE - <balance>

  • when cost = 0 and fmt = 1: <id>,<n>

  • when cost = 1 and fmt = 1: <cost>,<n>

  • when cost = 2 and fmt = 1: <id>,<n>,<cost>

  • when cost = 3 and fmt = 1: <id>,<n>,<cost>,<balance>

  • when cost = 0 and fmt = 2:
    <result>
    <id>id</id>
    <cnt>n</cnt>
    </result>

  • when cost = 1 and fmt = 2:
    <result>
    <cost>cost</cost>
    <cnt>n</cnt>
    </result>

  • when cost = 2 and fmt = 2:
    <result>
    <id>id</id>
    <cnt>n</cnt>
    <cost>cost</cost>
    </result>

  • when cost = 3 and fmt = 2:
    <result>
    <id>id</id>
    <cnt>n</cnt>
    <cost>cost</cost>
    <balance>balance</balance>
    </result>

  • when cost = 0 and fmt = 3:
    {
    "id": <id>,
    "cnt": <n>
    }

  • when cost = 1 and fmt = 3:
    {
    "cost": "<cost>",
    "cnt": <n>
    }

  • when cost = 2 and fmt = 3:
    {
    "id": <id>,
    "cnt": <n>,
    "cost": "<cost>"
    }

  • when cost = 3 and fmt = 3:
    {
    "id": <id>,
    "cnt": <n>,
    "cost": "<cost>",
    "balance": "<balance>"
    }

  • when op = 1 and fmt = 0 or 1, the information is added to the end of the normal output from a new line:
    <phone>,<mccmnc>,<cost>,<status>,<error>

  • when op = 1 and fmt = 2, an array is added to the response:
    <phones>
    <phone mccmnc="mccmnc" cost="cost" status="status" error="error">phone</phone>
    ...
    </phones>

  • when op = 1 and fmt = 3, an array is added to the response:
    "phones": [{
    "phone": "<phone>",
    "mccmnc": "<mccmnc>",
    "cost": "<cost>",
    "status": "<status>",
    "error": "<error>"
    },
    ...
    ]

Where:
<n><n> is the number of SMS sent, calculated as the number of SMS messages in the message multiplied by the number of recipients.
<id> Ц the message ID sent by the Client or assigned automatically by the Server.
<cnt> Ц the number of parts (when sending an SMS message) or the number of seconds (when sending a voice message (call)).
<balance> Ц new Customer Balance.
<phone> Ц phone number.
<mccmnc> Ц the numeric code of the subscriber's country plus the numeric code of the subscriber's operator.
<cost> Ц the cost of SMS-messages.
<status> Ц sMS Message status code.
<error> Ц error code in the status.

The server does not accept more than one identical request for sending SMS messages within a minute to protect against errors and loops in the Client-side program in order to reduce the load and not spend the Client's funds, as well as to prevent multiple messages from being sent to the same subscriber.

The server also blocks sending more than 50 messages to one subscriber, which were sent with a break between messages of less than 60 seconds, to protect against flooding and unnecessary debiting of funds from the Client's account, since many operators do not pass a large number of messages to one subscriber in a short period of time.




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