| Managing sender names (Sender ID)List of available operations with sender namesTo manage the names of senders, you must call the appropriate address using the GET or POST method, specifying
the required command and parameters.
To get a list of senders ' names registered in your personal account and approved by the moderator:
https://smscentre.com/sys/senders.php?get=1&login=<login>&psw=<password>
To add a new sender name:
https://smscentre.com/sys/senders.php?add=1&login=<login>&psw=<password>&sender=<sender>&cmt=<cmt>
To change the sender's name:
https://smscentre.com/sys/senders.php?chg=1&login=<login>&psw=<password>&sender=<sender>&cmt=<cmt>
or
https://smscentre.com/sys/senders.php?chg=1&login=<login>&psw=<password>&id=<id>&cmt=<cmt>
Sending a confirmation code for the sender's digital name:
https://smscentre.com/sys/senders.php?send_code=1&login=<login>&psw=<password>&sender=<sender>
Confirmation of the sender's digital name:
https://smscentre.com/sys/senders.php?check_code=1&login=<login>&psw=<password>&sender=<sender>&code=<code>
To delete the sender's name:
https://smscentre.com/sys/senders.php?del=1&login=<login>&psw=<password>&sender=<sender>
or
https://smscentre.com/sys/senders.php?del=1&login=<login>&psw=<password>&id=<id>
When adding or changing the sender's name in the request body, you can transfer a document file for operators (trademark certificate, domain certificate) in jpg, tif, pdf, png, zip, rar format. The maximum size of the transferred file should not exceed 3 MB. A comment on the document can be specified in the additional doc_info parameter.
Description of parameters
Description of the parameters passed to the Server:
Option | The value
|
---|
login | Customer Login.
|
---|
psw | Client Password (you can add or change it on this page).
|
---|
apikey | A special API key used for simplified authorization instead of the "login+password" pair (you can create it on this page).
|
---|
all | 0 (default) - get a list of activated sender names.
1 get a complete list of sender names.
|
---|
sender | The sender name that is being created or deleted.
|
---|
mts_step | 1 register a paid name with the MTS operator.
|
---|
sber_step | 1 register a free name with a Sberbank Mobile operator.
|
---|
tele2 | 1 register a name with the Tele2 operator at the tariff with free names.
|
---|
motiv | 1 register a name with the MOTIF operator according to the tariff with free names.
|
---|
mega_step | 1 register a paid name with the Megafon operator.
|
---|
bee_step | 1 register a paid name with the Beeline operator.
|
---|
motiv_step | 1 register a paid name with the MOTIV operator.
|
---|
winmob_step | 1 register a paid name with the Win-Mobile operator.
|
---|
volnamob_step | 1 register a paid name with the Wave mobile operator.
|
---|
tele2_step | 1 register a paid name with a Tele2 operator.
|
---|
ua_reg | 1 to register a name for Ukraine at a reduced rate of national traffic.
For this tariff, you must additionally pass the following parameters:
fio Legal name of the organization (LLC/SPD).
inn EDRPOU/INN.
site Website address or link to a social network.
email E-mail for communication.
address Actual address.
desc Description of the services provided by the sender.
subj Subject (purpose of informing).
|
---|
ua_int | 1 register a name for Ukraine at a higher rate for international traffic. To register, you also need to additionally pass the fields described above for the ua_reg parameter.
|
---|
by_reg | 1 register a name for Belarus for a reduced national traffic tariff.
For this tariff, you must additionally pass the following parameters:
by_fio Company Name.
by_inn UNP / INN.
by_address Company address.
by_ocup is the field of activity (options can be specified on this page). Numbering from 1 to 19.
by_type The type of mailing list (options can be specified on this page). Numbering from 1 to 3.
by_mes Sample message.
by_site Site address.
|
---|
by_int | 1 register a name for Belarus at a higher rate for international traffic. To register, you also need to additionally pass the fields described above for the by_reg parameter.
|
---|
id | ID of the sender's name, assigned by the Server
automatically when creating a new name.
|
---|
cmt | Comment specified when creating the sender name.
|
---|
mail | 1 add the sender's e-mail address.
|
---|
name | A comment related to the mail parameter (usually the name of the owner of the e-mail address).
|
---|
code | Code for confirming the sender's digital name.
|
---|
site | The address of the site from which the codes will be sent to confirm the digital
names of the senders. This parameter must have been previously added and activated as
Sender ID. If omitted, messages will be sent as the sender
by default.
|
---|
site_name | The site address specified in the text of the message with the confirmation code.
|
---|
user | The user ID of the subclient to which you apply the specified command.
|
---|
operators | 1 add the status code of the sender's name from the operator to the response.
|
---|
from_date | Select the names of senders starting from the specified date, for which the name status of any of the operators has been changed.
When this parameter is specified, the names are sorted in descending order of the date when the name statuses were changed. DD.MM.YYYY format.
|
---|
prev_id | A unique identifier of the sender's name that is assigned by the Server automatically when the name is created. Used to request a list of names created before the name with the specified ID.
|
---|
cnt | The number of sender names returned when requesting a list of names. The maximum value is 15000.
|
---|
doc_info | If a document file for operators is passed in the request body when creating or changing the sender's name, then you can specify a description for the passed file in this parameter.
|
---|
charset | Encoding of transmitted parameters.
|
---|
files | 1 return in the server response for the get command an array of files containing information about attached document files for operators. This parameter is relevant only for fmt=2 or fmt=3 formats.
The array includes the following fields:
file File name.
fid ID of the file in the system.
fstatus File status (0 - under review, 1 - rejected, 2 - approved).
fcomment Administrator's comment.
|
---|
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 value | Description
|
---|
1 | Error in parameters.
|
---|
2 | 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).
|
---|
3 | Sender name not found.
|
---|
4 | The IP address is temporarily blocked.
|
---|
5 | Error saving or deleting the sender's name.
|
---|
7 | Invalid number format.
|
---|
8 | The confirmation code cannot be delivered to the specified number.
|
---|
9 | Attempt to send more than three identical requests to get a list of available sender names
or five requests to create a new sender name 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).
|
---|
10 | The code has already been sent to the specified number. Retry is possible after 8 hours.
|
---|
11 | Invalid confirmation code.
|
---|
If the request is successful, the Server returns a response in the form of a string.
When requesting a list of sender names:
- with fmt = 0 and all = 0:
name = <sender>, id = <id>
... |
- with fmt = 1 and all = 0:
- with fmt = 2 and all = 0:
<list>
<sender id="<id>">sender</sender>
...
</list>
|
- with fmt = 3 and all = 0:
[{
"sender": "<sender>",
"id": <id>
},
...] |
- with fmt = 0 and all = 1:
name = <sender>, status = <status>, id = <id>
... |
- with fmt = 1 and all = 1:
<sender>,<status>,<id>
... |
- with fmt = 2 and all = 1:
<list>
<sender status="<status>" id="<id>">sender</sender>
...
</list>
|
- with fmt = 3 and all = 1:
[{
"sender": "<sender>",
"status": <status>,
"id": <id>
},
...] |
- with fmt = 0 and operators = 1:
name = <sender>, mega_step = <mega_step_status>, bee_step = <bee_step_status>, motiv_step = <motiv_step_status>, sber_step = <sber_step_status>, winmob_step = <winmob_step>, volnamob_step = <volnamob_step>, mts_step = <mts_step_status>, tele2_step = <tele2_step_status>, tele2 = <tele2_status>, ua_reg = <ua_reg_status>, ua_int = <ua_int_status>, mega_int = <mega_int_status>, motiv_int = <motiv_int_status>, mts_int = <mts_int_status>, motiv = <motiv_status>, by_reg = <by_reg_status>, by_int = <by_int_status>, tele2_int = <tele2_int_status>, sber_int = <sber_int_status>, id = <id>
... |
- with fmt = 2 and operators = 1:
<list>
<sender mega_step="<mega_step_status>" bee_step="<bee_step_status>" motiv_step="<motiv_step_status>" sber_step="<sber_step_status>" winmob_step="<winmob_step_status>" volnamob_step="<volnamob_step_status>" mts_step="<mts_step_status>" tele2_step="<tele2_step_status>" tele2="<tele2_status>" ua_reg="<ua_reg_status>" ua_int="<ua_int_status>" mega_int="<mega_int_status>" motiv_int="<motiv_int_status>" mts_int="<mts_int_status>" motiv="<motiv_status>" by_reg="<by_reg_status>" by_int="<by_int_status>" tele2_int="<tele2_int_status>" sber_int="<sber_int_status>" id="<id>">sender</sender>
...
</list>
|
- with fmt = 3 and operators = 1:
[{
"sender": "<sender>",
"mega_step": "<mega_step_status>",
"mega_int": "<mega_int_status>",
"bee_step": "<bee_step_status>",
"motiv": "<motiv_status>",
"motiv_step": "<motiv_step_status>",
"motiv_int": "<motiv_int_status>",
"sber_step": "<sber_step_status>",
"sber_int": "<sber_int_status>",
"winmob_step": "<winmob_step_status>",
"volnamob_step": "<volnamob_step_status>",
"mts_step": "<mts_step_status>",
"mts_int": "<mts_int_status>",
"tele2_step": "<tele2_step_status>",
"tele2": "<tele2_status>",
"tele2_int": "<tele2_int_status>",
"ua_reg": "<ua_reg_status>",
"ua_int": "<ua_int_status>",
"by_reg": "<by_reg_status>",
"by_int": "<by_int_status>",
"id": "<id>"
},
...] |
Where:
<sender> registered and approved sender name.
<mega_step_status>, <mega_int_status>, <bee_step_status>, <motiv_status>, <motiv_step_status>, <motiv_int_status>, <sber_step_status>, <sber_int_status>, <winmob_step_status>, <volnamob_step_status>, <mts_step_status>, <mts_int_status>, <tele2_step_status>, <tele2_status>, <tele2_int_status>, <ua_reg_status>, <ua_int_status>, <by_reg_status>, <by_int_status> the status code of the sender's name from the corresponding operator (0 - pending registration, 1 - sent for registration, 2 - allowed by the operator, 3 - not accepted by the operator, 4 - temporarily disabled, 5 - insufficient funds in the account, 8 - supporting documents are required, 9 - activation from the beginning of the month), 255 - allowed, but marked for de-registration).
<status> sender Name status (0-waiting for moderation, 1-allowed to use, 2-disabled).
<id> unique identifier of the sender's name (assigned by the Server automatically when creating a name).
If the sender's name has a replacement analog for any operator, then with operators = 1 and fmt = 0,2,3, this replacement will be additionally included in the server response.
When adding a new sender name:
- when fmt = 0: ID = <id>
- when fmt = 1: <id>
- when fmt = 2:
<sender>
<id>id</id>
</sender>
|
- when fmt = 3:
Where:
<id> the sender name ID assigned by the Server automatically.
When changing the sender's name, sending the code, confirming and deleting the sender's name:
- when fmt = 0, 1: OK
- when fmt = 2:
<result>OK</result>
- when fmt = 3:
Examples of actions with sender namesExamples:
Getting a list of sender names:
https://smscentre.com/sys/senders.php?get=1&login=alex&psw=123
Adding a new sender name:
https://smscentre.com/sys/senders.php?add=1&login=alex&psw=123&sender=my_shop&cmt=test
Sending a confirmation code for the sender's digital name:
https://smscentre.com/sys/senders.php?send_code=1&login=alex&psw=123&sender=79999999999
Sending confirmation code to the digital sender name for subclient "subalex" on behalf of "mysite.ru":
https://smscentre.com/sys/senders.php?send_code=1&login=alex&psw=123&sender=79999999999&user=subalex&site=mysite.ru
Confirmation of the sender's digital name:
https://smscentre.com/sys/senders.php?check_code=1&login=alex&psw=123&sender=79999999999&code=338824
Deleting the sender's name:
https://smscentre.com/sys/senders.php?del=1&login=alex&psw=123&sender=my_shop
The server does not accept more than three identical requests within a minute to get a list of available
sender names and five requests to create a new sender name to reduce the load and protect against errors and loops
in the Client-side program.
|