Documentation | SmsGateway24.com Postman link



If your service does not support sending a request via SSL (via https), then you can use the HTTP protocol

Getting a token

Description: The result of this query you get a token. In the future, with this token, you access the server and perform other requests.

Address https://smsgateway24.com/getdata/gettoken

Now your token: Login

Method: POST | GET

input parameters

Variable Type Description
email string Your login in the system. Usually email
pass string Your password in the system

Answer

Variable Type Description
token string Your token for requests. Token is associated with an account Now your token: Login
error number 0 / 1 - is there an error in processing the request
message string Error message

SMS sending

Description: Creates SMS on the server to send. After that, the phone with the Smsgateway24 application calls the server and takes the SMS and sends it from your sim card Download the application at the link Link to app SmsGateWay24

Address https://smsgateway24.com/getdata/addsms

Method: POST | GET

input parameters

Variable Type Description
token string Your token obtained from the method Get Token
sendto string Subscriber's phone number. All required characters are allowed. example: +1- (928) -111-22-33. Or several numbers via comma: 017642031983, 017642031996,017642031984
body string Target message body
device_id string Device ID
timetosend datetime YYYY-MM-DD | YYYY-MM-DD HH:MM:SS [optional] Time to send a message. For example, 2018-10-25 00:00:00
sim integer [not necessary] Sim #


Answer

Variable Type Description
error number 0 / 1 - is there an error in processing the request
message string Error message
sms_id integer sms Id

Sending bulk SMS via JSON

Description: Creates SMS on the server to send one batch at once. Allows you to create many SMS at once with one request

Address https://smsgateway24.com/getdata/addalotofsms

Method: POST | GET

input parameters

Variable Type Description
datajson JSON All data in JSON format

Answer

Variable Type Description
error number 0 / 1 - is there an error in processing the request
message string Error message

Example JSON

{"token":"df427bfcf113c9a21c67718035076b5b","smsdata":[{"sendto":"004917642039183","body":"Test message","sim":1,"timetosend":"2019-07-01 23:50:00","device_id":260},{"sendto":"004917642039183","body":"Test message 2","sim":1,"timetosend":"2019-07-01 23:50:00","device_id":260}]}

user friendly

{
   "token":"df427bfcf113c9a21c67718035076b5b",
   "smsdata":[
        {
            "sendto":"017642039183",
            "body":"Test body",
            "sim":1,
            "timetosend":"2019-07-01 23:50:00",
            "device_id":260
        },
        {
            "sendto":"017642039183",
            "body":"Test body 2",
            "sim":1,
            "timetosend":"2019-07-01 23:50:00",
            "device_id":260
        }
    ]
}

Get all SMS. (Including incoming SMS)

Description: Through this request, you can get all the messages that are associated with your account. Including you can receive all incoming SMS that come from customers. In this method, all input variables is required. SMS messages differ in status. 1 status - new SMS is created in the service, but not yet sent; 2 - status - those that have already been picked up by the phone and went to the client ( the phone itself is in the answer has there come free, unfortunately the status of the dostaki not uchityvaetsya in system); 5-status-incoming SMS from clients. Those SMS messages that came from clients and were sent to the server through the PRO version of the application (SmsGateWay24 PRO). Statuses 3 and 4 are not used;
Link to app SmsGateWay24 PRO

Address https://smsgateway24.com/getdata/getallsms

Method: POST | GET

input parameters

Variable Type Description
token string Your token obtained from the method Get Token
device_id integer Device ID. device list
status integer 1 | 2 | 5 1-new SMS, | 2-sent SMS | 5-Incoming SMS
begindate datetime YYYY-MM-DD | YYYY-MM-DD HH:MM:SS Period from
enddate datetime YYYY-MM-DD | YYYY-MM-DD HH:MM:SS Period to
sim int sim is the slot number in the phone: 0 or 1 (optional)

Answer

Variable Type Description
error number 0 / 1 - is there an error in processing the request
message string Error message
count integer SMS count
smss json sms json object


Add tag

Description: The tag is needed to create a newsletter on a group of numbers. For example, tag * Employees *.

Address https://smsgateway24.com/getdata/savetag

Method: POST | GET

input parameters

Variable Type Description
token string Your token obtained from the method Get Token
title string Tag name

Answer

Variable Type Description
error number 0 / 1 - is there an error in processing the request
message string Error message
tag_id number Tag ID

Get the Status of a single SMS

Description: You can find out the status of each SMS using this method

Address https://smsgateway24.com/getdata/getsmsstatus

Method: POST | GET

input parameters

Variable Type Description
token string Your token obtained from the method Get Token
sms_id string sms Id

Answer

Variable Type Description
sms_id integer sms Id
status integer Sms Status
status_description string Status Name
error integer 0 / 1 - is there an error in processing the request
message string error description

Get Device status

Description: You can find out the status of your devices

Address https://smsgateway24.com/getdata/getdevicestatus

Method: POST | GET

input parameters

Variable Type Description
token string Your token obtained from the method Get Token
device_id int device Id

Answer

Variable Type Description
error integer sms Id
message integer error description
lastseen datetime The time the device was online
device_id integer device id
title string device name

Add contacts with a tag

Description: Add contacts for any tag. For example, for the tag * Employees * your colleagues will perfectly fit.

Address https://smsgateway24.com/getdata/savecontact

Method: POST | GET

input parameters

Variable Type Description
token string Your token obtained from the method Get Token
fullname string contact name
phone string phone number
tag_id integer Tag ID

Answer

Variable Type Description
error number 0 / 1 - is there an error in processing the request
message string Error message
contact_id number Contact ID

Create a Newsletter

Description: Once you have created the tag, you can do the mailing on the tag phones.

Address https://smsgateway24.com/getdata/savepaket

Method: POST | GET

input parameters

Variable Type Description
token string Your token obtained from the method Get Token
title string Newsletter title
device_id number Device ID
body string Target message body
tags string tag Id. can be several, separated by commas. For example: 12,13,14

Answer

Variable Type Description
error number 0 / 1 - is there an error in processing the request
message string Error message
paket number Package ID

You can use Postman to send requests.

PHP code sample


$ch = curl_init();
$url = "https://smsgateway24.com/getdata/addsms";

$postarray = [
'token' => 'df427bfcf113c9a21c6771803507111',
'sendto' => '+4917642031983',
'body'   => 'Hello! Dear Client! ',
'timetosend'   => '2019-10-09 10:00:00',
'device_id'   => 260,
'sim'=>1
];

curl_setopt($ch, CURLOPT_URL, $url);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
curl_setopt($ch, CURLOPT_POST, 1);
curl_setopt($ch, CURLOPT_POSTFIELDS,$postarray);
curl_setopt($ch, CURLOPT_USERAGENT, 'Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8.1.13) Gecko/20080311 Firefox/2.0.0.13');
$output = curl_exec($ch);
curl_close($ch);
echo $output;

                            

Sample code for 1C

 Процедура ГлВыполнитьОтправкуСМС(Телефон,ТекстСМС) Экспорт


Логин=СокрЛП(Константа.ЛогинСМС);
Пароль=СокрЛП(Константа.ПарольСМС);
КодУстр=СокрЛП(Константа.КодУстройстваСМС);
Получатель=СокрЛП(Телефон);
Сообщение=СокрЛП(Лев(ТекстСМС,256));
Сообщение=ГлПреобразоватьСтрокуВУТФ8(Сообщение);

ТекстЗапроса="http://smsgateway24.com/getdata/smstosend?sendto="+Получатель+"&body="+Сообщение+"&device_id="+СокрЛП(КодУстр)+"&email="+Логин+"&pass="+Пароль;
Результат="";
Если ЗагрузитьВнешнююКомпоненту("c:\v7plus.dll") <> 1 Тогда
ТекстОшибки = "Компонента v7plus.dll не найдена!";
Сообщить(ТекстОшибки);
Возврат;
КонецЕсли;

Ошибка=0;
Соединение = СоздатьОбъект("AddIn.V7HttpReader");
Попытка
Соединение.ОтправитьДляОбработки(ТекстЗапроса,каталогиб()+"\temp.txt", 1,Результат, 2);
Исключение
Ошибка=1;
Сообщить("СМС не сформировано! для телефона "+Получатель+" Ответ сервера: "+Результат);
КонецПопытки;

Если Ошибка=0 Тогда
Сообщить("ОК. СМС сформировано! для телефона "+Получатель+" Ответ сервера: "+Результат);
КонецЕсли;


КонецПроцедуры
                            

Old methods API (GET) (HTTPS + HTTP)


Link to app SmsGateWay24

SMS sending

Description: Creates SMS on the server to send. After that, the phone with the Smsgateway24 application calls the server and takes the SMS and sends it from your sim card Download the application at the link : Link to app SmsGateWay24

Address https://smsgateway24.com/getdata/smstosend?sendto=PHONE &body=MESSAGE &device_id=DEVICE_ID&email=LOGIN&pass=PASSWORD

Address https://smsgateway24.com/getdata/smstosend?sendto=ТЕЛЕФОН&body=СООБЩЕНИЕ&device_id=ID_УСТРОЙСТВА&email=ЛОГИН&pass=ПАРОЛЬ&timetosend=2018-06-08 13:40:00

Method: GET

input parameters

Variable Type Description
email string Your login in the system. Usually email
pass string your password
sendto string Subscriber's phone number. All required characters are allowed. example: +1- (928) -111-22-33. Or several numbers via comma: 017642031983, 017642031996,017642031984
body string Target message body
device_id string Device ID
timetosend datetime [YYYY-mm-dd HH:MM:SS] [optional] Time to send a message. For example, 2018-10-25 00:00:00

Answer

Variable Type Description
error number 0 / 1 - is there an error in processing the request
message string Error message
sms_id integer sms Id
PHP:

$ch = curl_init();
$url = "https://smsgateway24.com/getdata/smstosend?sendto=" . $save->phone . "&body=" . $body . "&device_id=" . $device_id . "&email=support@smsgateway24.com&pass=123456";
curl_setopt($ch, CURLOPT_URL, $url);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
curl_setopt($ch, CURLOPT_USERAGENT, 'Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8.1.13) Gecko/20080311 Firefox/2.0.0.13');
$output = curl_exec($ch);
curl_close($ch);

                        

Telegram bot


If you want to send notifications to your phone via telegram, then connect our bot

Send request

Description: Send a POST request to the server and people will receive a message in a telegram

Before sending you need to do 3 steps:

  1. Download telegram from the official site Telegram.org
  2. Something to write bot @Smsgateway24bot
  3. Get your ID through the bot @MyTelegramID_bot
  4. Send POST request

Address https://smsgateway24.com/getdata/telegrammessage

Now your token: Login

Method: POST | GET

input parameters

Variable Type Description
token string Your token obtained from the method Get Token
body string Target message body
telegramid string Your Id to Telegram via @getmyid_bot

Answer

Variable Type Description
error number 0 / 1 - is there an error in processing the request
message string Error message