PHPackages                             unimtx/uni-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. [API Development](/categories/api)
4. /
5. unimtx/uni-sdk

ActiveLibrary[API Development](/categories/api)

unimtx/uni-sdk
==============

The official Unimatrix SDK for PHP.

v0.3.0(2y ago)12.7k↓50%MITPHPPHP &gt;=7.0

Since Dec 16Pushed 2y ago1 watchersCompare

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

READMEChangelog (2)DependenciesVersions (3)Used By (0)

Unimatrix PHP SDK
=================

[](#unimatrix-php-sdk)

[![Packagist](https://camo.githubusercontent.com/10d6c16b562e8632c6f199b918a5174910f6e694e962da1d07a701d6206f67cc/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f756e696d74782f756e692d73646b2e737667)](https://packagist.org/packages/unimtx/uni-sdk) [![Release](https://camo.githubusercontent.com/ea99a07dbedbc6e352a9e66251a8d3fcdf4fe21549c7d1d5a9207926b46dc552/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f72656c656173652f756e696d74782f756e692d7068702d73646b2e737667)](https://github.com/unimtx/uni-php-sdk/releases/latest) [![GitHub license](https://camo.githubusercontent.com/074b89bca64d3edc93a1db6c7e3b1636b874540ba91d66367c0e5e354c56d0ea/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f6c6963656e73652d4d49542d627269676874677265656e2e737667)](https://github.com/unimtx/uni-php-sdk/blob/main/LICENSE)

The Unimatrix PHP SDK provides convenient access to integrate communication capabilities into your PHP applications using the Unimatrix HTTP API. The SDK provides support for sending SMS, 2FA verification, and phone number lookup.

Getting started
---------------

[](#getting-started)

Before you begin, you need an [Unimatrix](https://www.unimtx.com/) account. If you don't have one yet, you can [sign up](https://www.unimtx.com/signup?s=php.sdk.gh) for an Unimatrix account and get free credits to get you started.

Documentation
-------------

[](#documentation)

Check out the documentation at [unimtx.com/docs](https://www.unimtx.com/docs) for a quick overview.

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

[](#installation)

Using Composer is the recommended way to install the Unimatrix SDK for PHP, which is available on [Packagist](https://packagist.org/packages/unimtx/uni-sdk).

Run the following command to add `unimtx/uni-sdk` as a dependency to your project:

```
composer require unimtx/uni-sdk
```

Usage
-----

[](#usage)

The following example shows how to use the Unimatrix PHP SDK to interact with Unimatrix services.

### Initialize a client

[](#initialize-a-client)

```
use Uni\UniClient;

$client = new UniClient([
  'accessKeyId' => 'your access key id',
  'accessKeySecret' => 'your access key secret'
]);
```

or you can configure your credentials by environment variables:

```
export UNIMTX_ACCESS_KEY_ID=your_access_key_id
export UNIMTX_ACCESS_KEY_SECRET=your_access_key_secret
```

### Send SMS

[](#send-sms)

Send a text message to a single recipient.

```
use Uni\UniClient;
use Uni\UniException;

$client = new UniClient();

try {
  $resp = $client->messages->send([
    'to' => '+1206880xxxx', // in E.164 format
    'text' => 'Your verification code is 2048.'
  ]);
  var_dump($resp->data);
} catch (UniException $e) {
  print_r($e);
}
```

### Send verification code

[](#send-verification-code)

Send a one-time passcode (OTP) to a recipient. The following example will send a automatically generated verification code to the user.

```
use Uni\UniClient;
use Uni\UniException;

$client = new UniClient();

$resp = $client->otp->send([
  'to' => '+1206880xxxx'
]);
var_dump($resp->data);
```

### Check verification code

[](#check-verification-code)

Verify the one-time passcode (OTP) that a user provided. The following example will check whether the user-provided verification code is correct.

```
use Uni\UniClient;
use Uni\UniException;

$client = new UniClient();

$resp = $client->otp->verify([
  'to' => '+1206880xxxx',
  'code' => '123456' // the code user provided
]);
var_dump($resp->valid);
```

Reference
---------

[](#reference)

### Other Unimatrix SDKs

[](#other-unimatrix-sdks)

To find Unimatrix SDKs in other programming languages, check out the list below:

- [Java](https://github.com/unimtx/uni-java-sdk)
- [Go](https://github.com/unimtx/uni-go-sdk)
- [Node.js](https://github.com/unimtx/uni-node-sdk)
- [Python](https://github.com/unimtx/uni-python-sdk)
- [Ruby](https://github.com/unimtx/uni-ruby-sdk)
- [.NET](https://github.com/unimtx/uni-dotnet-sdk)

License
-------

[](#license)

This library is released under the [MIT License](https://github.com/unimtx/uni-php-sdk/blob/main/LICENSE).

###  Health Score

22

—

LowBetter than 22% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity21

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity32

Early-stage or recently created project

 Bus Factor1

Top contributor holds 100% 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 ~223 days

Total

2

Last Release

1026d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/eadac4f0197e12b7f1026096443bce025dd9dd201b989950dceb29e0c8c560d1?d=identicon)[unimtx](/maintainers/unimtx)

---

Top Contributors

[![acathur](https://avatars.githubusercontent.com/u/4847490?v=4)](https://github.com/acathur "acathur (6 commits)")

---

Tags

2famessagingphpsdksmsunimatrixapisdkotp2fasmsmessagingverificationunimatrixunisdk

### Embed Badge

![Health badge](/badges/unimtx-uni-sdk/health.svg)

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

###  Alternatives

[infobip/infobip-api-php-client

PHP library for consuming Infobip's API

921.8M10](/packages/infobip-infobip-api-php-client)[erdum/php-open-ai-assistant-sdk

A PHP class for seamless interaction with the OpenAI Assistant API, enabling developers build powerful AI assistants capable of performing a variety of tasks.

203.1k](/packages/erdum-php-open-ai-assistant-sdk)

PHPackages © 2026

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