PHPackages                             smsgateway24/smsgateway24-php-sdk - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Utility &amp; Helpers](/categories/utility)
4. /
5. smsgateway24/smsgateway24-php-sdk

ActiveLibrary[Utility &amp; Helpers](/categories/utility)

smsgateway24/smsgateway24-php-sdk
=================================

php sdk for smsgateway24.com

v2.0.0(4y ago)109.2k↑16.7%2MITPHPPHP &gt;=7.1

Since May 29Pushed 3y ago2 watchersCompare

[ Source](https://github.com/smsgateway24/smsgateway24-php-sdk)[ Packagist](https://packagist.org/packages/smsgateway24/smsgateway24-php-sdk)[ RSS](/packages/smsgateway24-smsgateway24-php-sdk/feed)WikiDiscussions master Synced 1mo ago

READMEChangelog (8)Dependencies (4)Versions (8)Used By (0)

SmsGateWay24
============

[](#smsgateway24)

SmsGateWay24 is a service that can turn you android phone to gateway and you can start sending messages throw it.

PHP SDK
-------

[](#php-sdk)

PHP library for SmsGateWay24 API interaction.

Requires:

- PHP 7.1+

Here's a demo of how you can use it:

```
use \SmsGateway24\SmsGateway24;

$gateway = new SmsGateway24('your-api-token-here'); // get it in your profile

$to = "+4915752982212";  //required. Target Phone number
$message = "Hello, how are you?"; // required. Body Message.
$deviceId = 10403; //required.  get it in your profile after app installation on your android
$sim=0;  // Optional. 0 or 1. For Dual SIM devices. (if you skip it -> default sim is  0)
$timeToSend = "2022-01-12 00:00:00"; // Optional. time when you want to send SMS
$customerid = 12; // Optional. your internal customer ID.
$urgent = 1; // Optional. 1 or 0 to make sms Urgent.
$smsId = $gateway->addSms($to, $message, $deviceId, $timeToSend, $sim, $customerid, $urgent);

```

After that, the phone with the Smsgateway24 application calls the server and takes the SMS and sends it from your sim card.

### Getting Started

[](#getting-started)

Visit our [website](https://smsgateway24.com/), sign up and install app on your phone. Get your API token and device id.

Install the package via composer:

```
composer require smsgateway24/smsgateway24-php-sdk
```

### API Methods

[](#api-methods)

#### Add SMS to queue

[](#add-sms-to-queue)

Creates SMS on the server to send.

```
use \SmsGateway24\SmsGateway24;

$gateway = new SmsGateway24('your-api-token-here'); // get it in your profile

$to = "+4915752982212";  //required. Target Phone number
$message = "Hello, how are you?"; // required. Body Message.
$deviceId = 10403; //required.  get it in your profile after app installation on your android
$sim=0;  // Optional. 0 or 1. For Dual SIM devices. (if you skip it -> default sim is  0)
$timeToSend = "2022-01-12 00:00:00"; // Optional. time when you want to send SMS
$customerid = 12; // Optional. your internal customer ID.
$urgent = 1; // Optional. 1 or 0 to make sms Urgent.
$smsId = $gateway->addSms($to, $message, $deviceId, $timeToSend, $sim, $customerid, $urgent);

echo $smsId;
```

#### Get SMS status

[](#get-sms-status)

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

```
use \SmsGateway24\SmsGateway24;

$gateway = new SmsGateway24('your-api-token-here'); // get it in your profile

$smsId = 12345;

$statusResult = $gateway->getSmsStatus($smsId);

print_r($statusResult);
/*
Statuses values:
1 - New (just created)
2 - Taken from Server. The phone picked up the SMS from the server, but there is no information about the delivery yet.
5 - Income.
6 - Sent by Phone. Good status. The phone sent a text message. But there is no information about the delivery yet.
7 - Delivered. Good status. The phone texted and it was 100% delivered by the operator. The delivery status was sent to the server. (You need a webhook to your server - we have one! Write your server in the device settings on the website)
8 - Sms Not Delivered. The text message was not delivered. This usually means that the SIM card is blocked or the balance is negative
9 - Not SENT - Generic failure. The text message was not delivered. This usually means that the SIM card is blocked or the balance is negative
10 - Not sent - No service.
11 - Not Sent - Null PD.
12 - Not Sent - Radio off.
100 - not sent - NOT ALLOWED. Click the permission button in the app
101 - not sent - Not Allowed At all. Click the permission button in the app
*/
```

#### Get device status

[](#get-device-status)

```
use \SmsGateway24\SmsGateway24;

$gateway = new SmsGateway24('your-api-token-here'); // get it in your profile

$deviceId = 12345; // get it in your profile

$statusResult = $gateway->getDeviceStatus($deviceId);

print_r($statusResult);
```

#### Add Tag

[](#add-tag)

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

```
use \SmsGateway24\SmsGateway24;

$gateway = new SmsGateway24('your-api-token-here'); // get it in your profile

$tagId = $gateway->saveTag("Rich customers");

echo $tagId;
```

#### Save Contact

[](#save-contact)

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

```
use \SmsGateway24\SmsGateway24;

$gateway = new SmsGateway24('your-api-token-here'); // get it in your profile

$contactName = 'Support SmsGateWay24';
$phoneNum = '+4915752982212';
$tagId = 2456;

$contactId = $gateway->saveContact($contactName, $phoneNum, $tagId);

echo $contactId;
```

#### Create a Newsletter

[](#create-a-newsletter)

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

```
use \SmsGateway24\SmsGateway24;

$gateway = new SmsGateway24('your-api-token-here'); // get it in your profile

$paketTitle = 'some title';
$deviceId = 1234; // get it in your profile
$body = 'body text';
$tags = [12, 13, 14]; // ids

$paketId = $gateway->savePaket($paketTitle, $deviceId, $body, $tags);

echo $paketId;
```

Contributing
------------

[](#contributing)

Contributions are welcome!

Credits
-------

[](#credits)

- [Igor](https://github.com/underwear/)
- [Nik](https://github.com/nikitospush/)

###  Health Score

33

—

LowBetter than 75% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity31

Limited adoption so far

Community13

Small or concentrated contributor base

Maturity55

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 58.8% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~70 days

Recently: every ~106 days

Total

7

Last Release

1748d ago

Major Versions

v1.5.1 → v2.0.02021-07-27

PHP version history (2 changes)v1.2PHP ^7.1

v1.5.1PHP &gt;=7.1

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/66119138?v=4)[SmsGateWay24](/maintainers/smsgateway24)[@smsgateway24](https://github.com/smsgateway24)

---

Top Contributors

[![underwear](https://avatars.githubusercontent.com/u/4825406?v=4)](https://github.com/underwear "underwear (20 commits)")[![nikitospush](https://avatars.githubusercontent.com/u/8371008?v=4)](https://github.com/nikitospush "nikitospush (13 commits)")[![krekos](https://avatars.githubusercontent.com/u/1011578?v=4)](https://github.com/krekos "krekos (1 commits)")

---

Tags

php-libraryphp-sdksms

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/smsgateway24-smsgateway24-php-sdk/health.svg)

```
[![Health](https://phpackages.com/badges/smsgateway24-smsgateway24-php-sdk/health.svg)](https://phpackages.com/packages/smsgateway24-smsgateway24-php-sdk)
```

###  Alternatives

[shlinkio/shlink

A self-hosted and PHP-based URL shortener application with CLI and REST interfaces

4.8k4.3k](/packages/shlinkio-shlink)[ralphjsmit/laravel-helpers

A package containing handy helpers for your Laravel-application.

13704.6k2](/packages/ralphjsmit-laravel-helpers)[dhlparcel/magento2-plugin

DHL Parcel plugin for Magento 2

11180.5k2](/packages/dhlparcel-magento2-plugin)[aedart/athenaeum

Athenaeum is a mono repository; a collection of various PHP packages

255.2k](/packages/aedart-athenaeum)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
