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: +4917642031983, +4917642111111, +1 17642031984
body* string Target message body
device_id* string Device ID device list
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 #

customerid int Your customer's ID number. Optional field
urgent boolean (1 or 0) Urgent SMS. Optional field This SMS will be sent with priority. It can be useful if you send OTP

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,"urgent":1}]}

user friendly

{
   "token":"df427bfcf113c9a21c6771803501",
   "smsdata":[
        {
            "sendto":"017642039183",
            "body":"Your password is 12345",
            "sim":1,
            "timetosend":"2019-07-01 23:50:00",
            "device_id":260,
            "customerid":122,
            "urgent":1
        },
        {
            "sendto":"017642039183",
            "body":"Regular SMS. Not urgnet",
            "sim":1,
            "timetosend":"2019-07-01 23:50:00",
            "device_id":260,
            "customerid":122,
            "urgent":0
        }
    ]
}

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. ,
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 - New
2 - Taken from Server
5 - Income
6 - Sent by Phone
7 - Delivered
8 - Sms Not Delivered
9 - Not SENT - Generic failure
10 - Not sent - No service
11 - Not Sent - Null PDU
12 - Not Sent - Radio off
100 - not sent - NOT ALLOWED
101 - not sent - Not Allowed At all
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 - это номер слота в телефоне: 0 или 1 (необязательный)
customerid int Your customer's ID number. Optional field
onlycount 0/1 Show only count

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
1 - New
2 - Taken from Server
5 - Income
6 - Sent by Phone
7 - Delivered
8 - Sms Not Delivered
9 - Not SENT - Generic failure
10 - Not sent - No service
11 - Not Sent - Null PDU
12 - Not Sent - Radio off
100 - not sent - NOT ALLOWED
101 - not sent - Not Allowed At all
status_description string Status Name
error integer 0 / 1 - is there an error in processing the request
message string error description

Get device list

Description: You can find out all about your devices.

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

Method: POST | GET

input parameters

Variable Type Description
token* string Your token obtained from the method Get Token

Answer

Variable Type Description
count integer Number of devices
device json Description of each device

Field description
  • id - Device ID
  • title - Device Name
  • number - Phone number
  • created - Device Creation Date
  • createdhumanformat - Date created device in regular format
  • lastseen - The date the device was last seen
  • lastseenhumanformat - The date the device was last seen
  • serialnumber - Device serial number
  • siminfo - Information about SIM cards in JSON
  • appversion - The version of the application installed on the device
  • isappversionactual - Is the application version up-to-date
  • delaybetweeneachsms - Dynamic delay between each SMS
  • delaybetweenrequest - The delay between each request to the server
  • subscription - Is there a subscription on the device

Example

    {
    "count": 2,
    "device": {
        "1576": {
            "id": 1576,
            "title": "AOSP_on_IA_Emulator",
            "number": null,
            "imei": "358240051111110",
            "created": {
                "date": "2020-03-28 20:10:29.000000",
                "timezone_type": 3,
                "timezone": "UTC"
            },
            "createdhumanformat": "28.03.2020 20:10:29",
            "lastseen": {
                "date": "2020-04-23 17:02:21.000000",
                "timezone_type": 3,
                "timezone": "UTC"
            },
            "lastseenhumanformat": "23.04.2020 17:02:21",
            "serialnumber": "EMULATOR30X0X5X0",
            "siminfo": [
                {
                    "Slot": "0",
                    "IccId": "89014103211118510720",
                    "Number": " 15555215554",
                    "Roaming": "0",
                    "CountryIso": "us",
                    "CarrierName": "Android (T-Mobile)"
                }
            ],
            "appversion": "12.1.4",
            "isappversionactual": false,
            "delaybetweeneachsms": null,
            "delaybetweenrequest": 1,
            "subscription": true
        },
        "1297": {
            "id": 1297,
            "title": "Android_SDK_built_for_x86",
            "number": null,
            "imei": "null",
            "created": {
                "date": "2020-01-20 14:01:05.000000",
                "timezone_type": 3,
                "timezone": "UTC"
            },
            "createdhumanformat": "20.01.2020 14:01:05",
            "lastseen": {
                "date": "2020-04-20 20:51:34.000000",
                "timezone_type": 3,
                "timezone": "UTC"
            },
            "lastseenhumanformat": "20.04.2020 20:51:34",
            "serialnumber": "unknown",
            "siminfo": [
                {
                    "Slot": "0",
                    "IccId": "8949226172233934327",
                    "Number": " 4917642031983",
                    "Roaming": "1",
                    "CountryIso": "de",
                    "CarrierName": "Drillisch (o2)"
                }
            ],
            "appversion": "12.1.4",
            "isappversionactual": false,
            "delaybetweeneachsms": 5,
            "delaybetweenrequest": 10,
            "subscription": false
        }
    }
}

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 device list

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 device list
body* string Target message body
tags* string tag Id. can be several, separated by commas. For example: 12,13,14
sim* int sim - это номер слота в телефоне: 0 или 1 (необязательный)

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.

Get PHP SDK from GitHub:

https://github.com/smsgateway24/smsgateway24-php-sdk

Get on Packagist.org

https://packagist.org/packages/smsgateway24/smsgateway24-php-sdk

Or use command

composer require smsgateway24/smsgateway24-php-sdk

composer require smsgateway24/smsgateway24-php-sdk

Use plugin for PrestaShop


Free SMS Notifications using own network Module

How to:


I. Install steps:


1. Download the module from your account
2. Go to your shop's dashboard
3. Go to Modules
4. Click Add Module and select the archive you've downloaded from your computer
5. Install the module

II. Configuration


1. Enable - Choose to enable/disable SMS Notifications on your website;
2. Customer SMS consent - Choose if customers should give their consent when receiving SMS notifications. A dedicated page will be displayed on customer's account for the SMS consent.
3. Active API - The Main API Service used for sending SMS notifications;
4. API Token– The token used for your sms gateway account;
5. Device ID - The Device ID from your smsgateway.me or smsgateway25.com account

6. SIM ID - The Device ID from your smsgateway25.com account. SIM ID is required only if you use smsgateway25.com!
7. Admin's mobile phone - The number used to receive Admin Notifications. It must start with "+" followed by the country code;
6. Customer notifications - Notifications send only to customers;
9. Admin notifications - Notifications send only to admin;
10. Supplier notifications - Notifications send only to suppliers;
11. SMS delay - Send SMS notifications with a delay using CRON JOB; This option us useful when the Mobile Network Provider does not allow sending SMS messages at a very short interval of time;
12. Feed generation interval - Set the cron run interval;
13. SMS HISTORY button – displays the history log of the sent messages on the shop;
14. CLEAR SMS HISTORY button – clears the history log of the sent messages on the shop;
15. CLEAR SMS HISTORY button – clears the history log of the sent messages on the shop;

III. SMS Templates




Each SMS notification message can be customised.
Each Order Status can sent a customised sms message to the customer.
You can also use shortcodes to build the SMS template.


IV. Send single/bulk SMS.




The module allows you to send a single SMS or you can send Bulk SMS. The bulk SMS option is often


used to send SMS Marketing campaigns to the store’s clients.

V. Check the history


The module has an option that allows you to see the SMS messages that have been sent on the shop.


VI. Abandoned cart sms reminders


The module has an option that allows you to send SMS reminders to customers that have abandoned carts.


VII. Frequently asked questions



. My clients, or the admin does not receive any messages
. - Check your Phone, it must be permanently connected to Internet (Mobile data or Wireless) and needs to have a Carrier SMS Plan. Also be sure the app on your phone is not put to sleep – tutorial here.

. How can I change the automatic messages that are being sent with the module?
- The messages can be customised from Translations > Module Translations.

. Does this module works on iPhone?
- No, at this moment there’s no app for iPhone. If you find one please contact us and we’ll help you with the integration.

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: +4917642031983, +4917642111111, +1 17642031984
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