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 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.


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

Actions with deferred tasks

To reduce the load on the Server when unloading a large package of sent messages, the system implemented a deferred task mechanism. This mechanism periodically selects active tasks for unloading message packets and executes them. This allows not only to reduce the load on the Server, but also to eliminate delays in the formation and unloading of message packets in the Client's browser.

To get a list of pending tasks, you must use the GET or POST method to call the address: https://smscentre.com/sys/downloads.php?login=<login>&psw=<password>&get_list=1
To receive the task file with the sent messages, you must use the GET or POST method to call the address: https://smscentre.com/sys/downloads.php?login=<login>&psw=<password>&get_file=1&id=<id> or https://smscentre.com/sys/downloads.php?login=<login>&psw=<password>&get_file=1&name=<name>
The following parameters are passed to the server:

OptionThe value
loginCustomer Login.
pswClient Password (you can add or change it on this page).
apikeyA special API key used for simplified authorization instead of the "login+password" pair (you can create it on this page).
cntThe number of pending tasks returned by the Server.
after_idThis parameter indicates to the Server that it is necessary to return a list of tasks with IDs following after_id in the response..
idUpload a task file with an ID equal to id.
nameUpload a task file named name.

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).
4The IP address is temporarily blocked.
5The deferred task or download file was not found in the system.
9Attempt to send more than three identical requests to receive a list of tasks or to download a file 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 successful, the Server returns a response in the form of a string.

When you receive a list of pending tasks:
  • when fmt = 0: id = <id>, name = <name>, status = <status>, created = <created>, time = <time>, file = <file>

  • when fmt = 1: <id>,<name>,<status>,<created>,<time>,<file>

  • when fmt = 2:
    <list>
    <task>
    <id>id</id>
    <name>name</name>
    <status>status</status>
    <created>created</created>
    <time>time</time>
    <file>file</file>
    </task>
    ...
    </list>

  • when fmt = 3:
    [{ "id": id,
    "name": "name",
    "status": "status",
    "created": "created",
    "time": "time",
    "file": "file"
    },
    ...]

Where:
<id> – iD of the deferred task.
<name> – name task.
<status> – task status (0 - pending, 1 - in progress, 2 - completed, 3 - canceled, 4 - execution error).
<created> – date the task was created.
<time> – task start time.
<file> – the name of the task file.

After assigning the status 2 (completed) to the deferred task, you will be able to download a file with a package of sent messages in csv format.

The server does not accept more than three identical requests to receive a list of tasks or to download a file 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