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

Managing operator templates

To manage templates for service, transactional, and other templated messages, you must call the appropriate address using the GET or POST method, specifying the required command and parameters.

To create a template (for all operators): https://smscentre.com/sys/op_templates.php?add=1&login=<login>&psw=<password>&sender=<sender>&msg=<msg>&mts_srv=1&mts_auth=1&mts_trn=1&mega_srv=1&mega_auth=1&mega_trn=1&mega_adv=1&bee_srv=1&bee_trn=1&tele2_srv=1&tele2_trn=1&motiv_srv=1&motiv_trn=1&soc=1
To get information about the template (for all operators): https://smscentre.com/sys/op_templates.php?get=1&login=<login>&psw=<password>&sender=<sender>&msg=<msg>
The following parameters are passed to the server:

OptionThe value
loginCustomer Login.
pswClient Password (you can add or change it on this page).
senderThe name of the sender for which the template is being created.
msgTemplate text.
charsetThe encoding of the template text, if used other than the default windows encoding-1251. Options: utf-8 and koi8-r.
mts_srvCreate a template for the MTS operator (service messages).
mts_authCreate a template for the MTS operator (authorization messages).
mts_trnCreate a template for the MTS operator (transactional messages).
mega_advCreate a template for the Megafon operator (advertising template messages).
mega_srvCreate a template for the Megafon operator (service (information) messages).
mega_authCreate a template for the Megafon operator (authorization messages).
mega_trnCreate a template for the Megafon operator (transactional messages).
bee_srvCreate a template for the Beeline operator (service messages).
bee_trnCreate a template for the Beeline operator (transactional messages).
tele2_srvCreate a template for the Tele2 operator (service messages).
tele2_trnCreate a template for the Tele2 operator (transactional messages).
motiv_srvCreate a template for the MOTIVE operator (service messages).
motiv_trnCreate a template for the MOTIVE operator (transactional messages).
socCreate a template for a soc message sent to users of the Odnoklassniki, VKontakte, or Mail.Ru Agent social networks".

If an error occurs, the Server returns the following string:
  • when fmt = 0:
    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).
4The IP address is temporarily blocked.
9Attempt to send more than ten identical template action requests.
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 successful, the Server returns a response in the form of a string:

When creating a template:
  • when fmt = 0:
    name = <status>, id = <id>
    ...

  • when fmt = 1:
    <name>,<status>,<id>
    ...

  • when fmt = 2:
    <result>
    <template>
    <name>name</name>
    <status>status</status>
    <id>id</id>
    </template>
    ...
    </result>

  • when fmt = 3:
    [{
    "name": <status>,
    "id": <id>
    },
    ...]

When requesting a list of templates:
  • when fmt = 0:
    name = <status>, id = <id>
    ...

  • when fmt = 1:
    <name>,<status>,<id>
    ...

  • when fmt = 2:
    <result>
    <template>
    <name>name</name>
    <status>status</status>
    <id>id</id>
    </template>
    ...
    </result>

  • when fmt = 3:
    [{
    "name": <status>,
    "id": <id>
    },
    ...]

Where:
<name> – the name of the operator and the type of messages.
<id> – the template ID assigned by the system automatically.
<status> – the status of the template, can take the following values:

for the add command:
-2 – the specified template cannot be saved;
-1 – the sender name for this template was not found or was not accepted by the operator;
1 – template added successfully;

for the get command:
-1 – the template for the specified operator was not found;
0 – awaiting registration;
1 – sent for registration;
2 – accepted by the operator;
3 – not accepted by the operator;
4 – temporarily disabled.

The server does not accept more than ten identical requests for actions with templates within a minute to reduce the load and protect against errors and loops in the Client-side program.




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