SmsGateWay24 Your personal sms gateway

Documentation | SmsGateway24.com Postman link



Wenn Ihr Service das Senden einer Anfrage über SSL (über https) nicht unterstützt, können Sie das HTTP-Protokoll verwenden

Getting a token

Description: Das Ergebnis dieser Abfrage erhalten Sie ein Token. Mit diesem Token greifen Sie in Zukunft auf den Server zu und führen andere Anfragen aus.

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
error number 0 / 1 - is there an error in processing the request
message string Error message

SMS sending

Description: Создает смс на сервере для отправки. После этого телефон с приложением Smsgateway24 обращается к серверу и забирает смс и отправляет со своей sim карты. Скачать приложение можно по ссылке 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

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

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: Создает смс на сервере для отправки. После этого телефон с приложением Smsgateway24 обращается к серверу и забирает смс и отправляет со своей sim карты. Скачать приложение можно по ссылке : 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