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

MESSAGES SENDING

MANAGING MAILING LISTS

MESSAGE STATUSES

CHECKING THE BALANCE STATUS

MANAGING CONTACTS

CLIENT MANAGEMENT

MANAGING SENDER NAMES (SENDER ID)

GETTING DATA

VARIOUS

Server response and error codes

If an error occurs, the Server returns the following string:
  • ERROR = N (description)

  • When fmt = 1:
    0,-N

  • When fmt = 2:
    <result>
    <error>description</error>
    <error_code>N</error_code>
    </result>

  • When fmt = 3:
    {
    "error": "description",
    "error_code": N
    }
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).
3No records found.
4The IP address is temporarily blocked.
5Operation execution error.
6The subclient with the specified login does not exist.
7A sublogin that shares a balance with the main account is specified, or the balance2=1 parameter is not specified in the request for an operation with an electronic balance.
8Error when saving a record.
9Attempt to send more than three requests to add a subclient or change something in that subclient within minutes.
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).
10Insufficient funds for crediting.

If the request is successful, the Server returns a response in the form of a string.

When you create a subclient:
  • when fmt = 0: ID = <id>

  • when fmt = 1: <id>

  • when fmt = 2:
    <user
    <id>id</id>
    </user>

  • when fmt = 3:
    {
    "id": <id>
    }

Where <id><id> is the sub-client ID assigned by the Server automatically.

When changing the sublogin:
  • when fmt = 0,1: OK

  • when fmt = 2:
    <result>OK</result>

  • when fmt = 3:
    {
    "result": "OK"
    }


When requesting statistics:
  • with fmt = 0 and get_stat = 1:
    login = <login>, sms = <cnt>, credit = <credit>, debit = <debit>, currency = <currency>
    ...

  • with fmt = 0 and get_stat_all = 1:
    login = <login>, description = <description>, operator = <operator>, mccmnc = <mccmnc>, sms = <cnt>, credit = <credit>, debit = <debit>, currency = <currency>
    ...

  • with fmt = 1 and get_stat = 1:
    <login>,<cnt>,<credit>,<debit>,<currency>
    ...

  • with fmt = 1 and get_stat_all = 1:
    <login>,<description>,<operator>,<mccmnc>,<cnt>,<credit>,<debit>,<currency>
    ...

  • with fmt = 2 and get_stat = 1:
    <list>
    <stat>
    <login>login</login>
    <sms>cnt</sms>
    <credit>credit</credit>
    <debit>debit</debit>
    <currency>currency</currency>
    </stat>
    ...
    </list>

  • with fmt = 2 and get_stat_all = 1:
    <list>
    <user login="login">
    <item>
    <description>description</description>
    <operator>operator</operator>
    <mccmnc>mccmnc</mccmnc>
    <sms>cnt</sms>
    <credit>credit</credit>
    <debit>debit</debit>
    <currency>currency</currency>
    </item>
    ...
    </user>
    ...
    </list>

  • with fmt = 3 and get_stat = 1:
    [{
    "login": "<login>",
    "sms": "<cnt>",
    "credit": "<credit>",
    "debit": "<debit>",
    "currency": "<currency>"
    },
    ...]

  • with fmt = 3 and get_stat_all = 1:
    [{
    "login": "<login>",
    "items": [{
    "description": "<description>",
    "operator": "<operator>",
    "mccmnc": "<mccmnc>",
    "sms": "<cnt>",
    "credit": "<credit>",
    "debit": "<debit>",
    "currency": "<currency>"
    },
    ...]
    },
    ...]

Where:
<login> - login subclient.
<description> - operation name.
<operator> - operator name.
<mccmnc><mccmnc> - numeric code of the subscriber's country plus numeric code of the subscriber's operator
<cnt><cnt> - number of messages.
<credit> - debit.
<debit> - credit.
<currency> - the three-character currency code subclient.



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