PHPackages                             elmage/textng-php - 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. [HTTP &amp; Networking](/categories/http)
4. /
5. elmage/textng-php

ActiveLibrary[HTTP &amp; Networking](/categories/http)

elmage/textng-php
=================

An unofficial textng.xyz SMS API Wrapper for PHP

v0.2.0(5y ago)230MITPHPPHP ^7.4

Since Aug 19Pushed 5y ago1 watchersCompare

[ Source](https://github.com/elmage/textng-php)[ Packagist](https://packagist.org/packages/elmage/textng-php)[ Docs](https://github.com/elmage/textng-php)[ RSS](/packages/elmage-textng-php/feed)WikiDiscussions master Synced 2d ago

READMEChangelog (3)Dependencies (8)Versions (6)Used By (0)

TextNg PHP Library
==================

[](#textng-php-library)

[![Latest Version on Packagist](https://camo.githubusercontent.com/cbbc18b0f0690a08facb94ba5bd109ad221f630527ade89be939ee14b65c30b7/68747470733a2f2f706f7365722e707567782e6f72672f656c6d6167652f746578746e672d7068702f762f756e737461626c65)](https://packagist.org/packages/elmage/textng-php)[![Latest Version on Packagist](https://camo.githubusercontent.com/ae3efc8fce5c09d93126dec21e3e9813b73356c96d79eb577c11a504082772f5/68747470733a2f2f706f7365722e707567782e6f72672f656c6d6167652f746578746e672d7068702f76657273696f6e)](https://packagist.org/packages/elmage/textng-php)[![Software License](https://camo.githubusercontent.com/55c0218c8f8009f06ad4ddae837ddd05301481fcf0dff8e0ed9dadda8780713e/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f6c6963656e73652d4d49542d627269676874677265656e2e7376673f7374796c653d666c61742d737175617265)](LICENSE.md)[![Build Status](https://camo.githubusercontent.com/c412dac2a83f986561a7540a6e818011dd7945071acaa81c989a675af4d37de8/68747470733a2f2f7472617669732d63692e636f6d2f656c6d6167652f746578746e672d7068702e7376673f6272616e63683d6d6173746572)](https://travis-ci.org/elmage/textng-php)[![Coverage Status](https://camo.githubusercontent.com/55f0117be6c5783778ff4e3d58105b574539053ae7c66c9ea8f81f962a5b1282/68747470733a2f2f7363727574696e697a65722d63692e636f6d2f672f656c6d6167652f746578746e672d7068702f6261646765732f636f7665726167652e706e673f623d6d6173746572)](https://scrutinizer-ci.com/g/elmage/textng-php/code-structure)

This is an unofficial client library for the TextNg SMS API. We provide an intuitive, stable interface to integrate TextNG SMS into your PHP project.

Installation
------------

[](#installation)

Install the library using Composer. Please read the [Composer Documentation](https://getcomposer.org/doc/01-basic-usage.md) if you are unfamiliar with Composer or dependency managers in general.

```
$ composer require elmage/textng-php
```

Authentication
--------------

[](#authentication)

### API Key

[](#api-key)

```
use Elmage\TextNg\Configuration;
use Elmage\TextNg\Client;

$configuration = new Configuration($apiKey, $senderName);
$client = Client::create($configuration);
```

Usage
-----

[](#usage)

This is not intended to provide complete documentation of the API. For more detail, please refer to the [Official Documentation](https://textng.xyz/api).

**Get Unit Balance**

```
$response = $client->getBalance();
```

**Send SMS**

```
$response = $client->sendSMS($route, $phoneNumbers, $message, $bypassCode, $optionalParamsArray);
```

**Send OTP**

```
// This method accepts only one phone number
// and calls $client->sendSMS(..., [$phoneNumber], ...)
// passing the supplied phone number as the single element in an array

$response = $client->sendOTP($route, $phoneNumber, $message, $bypassCode, $optionalParamsArray);
```

**Get Delivery Report**

```
$response = $client->getDeliveryReport($reference, $req, $used_route);
```

`$req` can take one of the 3 values `all`, `dnd` or `success` (as specified in the [API DOC](https://textng.xyz/api))

**Create Customer**

```
$response = $client->createCustomer($customerName, $customerPhone, $categoryID);
```

`$categoryID` is the category url ID generated for each url link you create. (as specified in the [API DOC](https://textng.xyz/api/#addcustomer))

**Remove Customer**

```
$response = $client->removeCustomer($customerPhone, $categoryID);
```

Change log
----------

[](#change-log)

Please see [CHANGELOG](CHANGELOG.md) for more information on what has changed recently.

Testing
-------

[](#testing)

```
$ composer test
```

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

[](#contributing)

Please see [CONTRIBUTING](CONTRIBUTING.md) and [CODE\_OF\_CONDUCT](CODE_OF_CONDUCT.md) for details.

Security
--------

[](#security)

If you discover any security related issues, please email  or use the issue tracker.

Credits
-------

[](#credits)

- [Samuel Ogaba](https://github.com/elmage)

License
-------

[](#license)

The MIT License (MIT). Please see [License File](LICENSE.md) for more information.

###  Health Score

25

—

LowBetter than 37% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity10

Limited adoption so far

Community20

Small or concentrated contributor base

Maturity48

Maturing project, gaining track record

 Bus Factor3

3 contributors hold 50%+ of commits

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 ~0 days

Total

4

Last Release

2092d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/245d09f421f6e0d5b18c0f25731f3590a7075487367cce0bafeec7a6650f1270?d=identicon)[elmage](/maintainers/elmage)

---

Top Contributors

[![philsturgeon](https://avatars.githubusercontent.com/u/67381?v=4)](https://github.com/philsturgeon "philsturgeon (49 commits)")[![frankdejonge](https://avatars.githubusercontent.com/u/534693?v=4)](https://github.com/frankdejonge "frankdejonge (38 commits)")[![elmage](https://avatars.githubusercontent.com/u/9973640?v=4)](https://github.com/elmage "elmage (20 commits)")[![ravage84](https://avatars.githubusercontent.com/u/625761?v=4)](https://github.com/ravage84 "ravage84 (10 commits)")[![gmponos](https://avatars.githubusercontent.com/u/5675248?v=4)](https://github.com/gmponos "gmponos (10 commits)")[![jotaelesalinas](https://avatars.githubusercontent.com/u/2042875?v=4)](https://github.com/jotaelesalinas "jotaelesalinas (8 commits)")[![colinodell](https://avatars.githubusercontent.com/u/202034?v=4)](https://github.com/colinodell "colinodell (7 commits)")[![RobLoach](https://avatars.githubusercontent.com/u/25086?v=4)](https://github.com/RobLoach "RobLoach (7 commits)")[![hansott](https://avatars.githubusercontent.com/u/3886384?v=4)](https://github.com/hansott "hansott (7 commits)")[![reinink](https://avatars.githubusercontent.com/u/882133?v=4)](https://github.com/reinink "reinink (5 commits)")[![browner12](https://avatars.githubusercontent.com/u/5232313?v=4)](https://github.com/browner12 "browner12 (5 commits)")[![bcrowe](https://avatars.githubusercontent.com/u/752603?v=4)](https://github.com/bcrowe "bcrowe (5 commits)")[![EmanueleMinotto](https://avatars.githubusercontent.com/u/417201?v=4)](https://github.com/EmanueleMinotto "EmanueleMinotto (5 commits)")[![marcqualie](https://avatars.githubusercontent.com/u/101022?v=4)](https://github.com/marcqualie "marcqualie (4 commits)")[![hassankhan](https://avatars.githubusercontent.com/u/1781985?v=4)](https://github.com/hassankhan "hassankhan (3 commits)")[![fulldecent](https://avatars.githubusercontent.com/u/382183?v=4)](https://github.com/fulldecent "fulldecent (3 commits)")[![jclyons52](https://avatars.githubusercontent.com/u/6395559?v=4)](https://github.com/jclyons52 "jclyons52 (3 commits)")[![alexbilbie](https://avatars.githubusercontent.com/u/77991?v=4)](https://github.com/alexbilbie "alexbilbie (2 commits)")[![assertchris](https://avatars.githubusercontent.com/u/200609?v=4)](https://github.com/assertchris "assertchris (2 commits)")[![barryvdh](https://avatars.githubusercontent.com/u/973269?v=4)](https://github.com/barryvdh "barryvdh (2 commits)")

---

Tags

smselmagetextng-phptextng

###  Code Quality

TestsPHPUnit

Static AnalysisPsalm

Code StylePHP CS Fixer

Type Coverage Yes

### Embed Badge

![Health badge](/badges/elmage-textng-php/health.svg)

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

###  Alternatives

[shopify/shopify-api

Shopify API Library for PHP

4634.8M16](/packages/shopify-shopify-api)[phpro/http-tools

HTTP tools for developing more consistent HTTP implementations.

28137.8k](/packages/phpro-http-tools)[akamai-open/edgegrid-client

Implements the Akamai {OPEN} EdgeGrid Authentication specified by https://developer.akamai.com/introduction/Client\_Auth.html

482.5M6](/packages/akamai-open-edgegrid-client)[mimmi20/browser-detector

Library to detect Browsers and Devices

48153.5k3](/packages/mimmi20-browser-detector)[aedart/athenaeum

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

245.2k](/packages/aedart-athenaeum)[huaweicloud/huaweicloud-sdk-php

Huawei Cloud SDK for PHP

1829.2k2](/packages/huaweicloud-huaweicloud-sdk-php)

PHPackages © 2026

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