PHPackages                             jorisvandesande/unifi-api-client - 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. jorisvandesande/unifi-api-client

ActiveLibrary[API Development](/categories/api)

jorisvandesande/unifi-api-client
================================

Unifi API Client can be used to connect to the API of your Ubiquiti Unifi Controller

219210PHP

Since Nov 26Pushed 8y ago4 watchersCompare

[ Source](https://github.com/jorisvandesande/unifi-api-client)[ Packagist](https://packagist.org/packages/jorisvandesande/unifi-api-client)[ RSS](/packages/jorisvandesande-unifi-api-client/feed)WikiDiscussions master Synced 1mo ago

READMEChangelogDependenciesVersions (1)Used By (0)

Unifi API Client
================

[](#unifi-api-client)

Unifi API Client can be used to connect to the API of your [Ubiquiti Unifi Controller](https://www.ubnt.com/enterprise/software/). This client is build on top of [Guzzle](http://guzzlephp.org/).

The code is tested against Unifi Controller version 4.6.6.

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

[](#installation)

The API client can be installed with [Composer](https://getcomposer.org/):

```
composer require jorisvandesande/unifi-api-client

```

Or you can download the latest release at:

Usage
-----

[](#usage)

```
use JVDS\UnifiApiClient\Client;
use GuzzleHttp\Client as HttpClient;

$apiClient = new Client(new HttpClient(['base_uri' => 'https://127.0.0.1:8443']));
$apiClient->login('your_username', 'your_password');

// call supported methods via methods on the client
$apiClient->statistics('default');

// or call any API url via the get and post methods:
$apiClient->get('/api/self');
$apiClient->post('/api/s/default/cmd/stamgr', ['cmd' => 'block-sta', 'mac' => '01:01:01:01:01:01']);

// logout
$apiClient->logout();
```

Examples can be found in the [examples](examples) directory. To run the examples, you must copy the config.example.php file to config.php and change the configuration to your needs.

Supported API calls
-------------------

[](#supported-api-calls)

At the moment only a few API methods are implemented in the Client. Altough it is possible to use the `get()` and `post()` methods of the Client to call any API url, the goal is to support more methods.

License
-------

[](#license)

MIT Licensed, see the [LICENSE](LICENSE) file.

###  Health Score

26

—

LowBetter than 43% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity21

Limited adoption so far

Community14

Small or concentrated contributor base

Maturity41

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 83.3% 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.

### Community

Maintainers

![](https://www.gravatar.com/avatar/4aaf19b5ea7e131e981b971ebcf50ebc214b2c8bf22dc6751c7a64c46e4190eb?d=identicon)[jorisvandesande](/maintainers/jorisvandesande)

---

Top Contributors

[![jorisvandesande](https://avatars.githubusercontent.com/u/1410498?v=4)](https://github.com/jorisvandesande "jorisvandesande (5 commits)")[![nohn](https://avatars.githubusercontent.com/u/113465?v=4)](https://github.com/nohn "nohn (1 commits)")

### Embed Badge

![Health badge](/badges/jorisvandesande-unifi-api-client/health.svg)

```
[![Health](https://phpackages.com/badges/jorisvandesande-unifi-api-client/health.svg)](https://phpackages.com/packages/jorisvandesande-unifi-api-client)
```

###  Alternatives

[stripe/stripe-php

Stripe PHP Library

4.0k143.3M480](/packages/stripe-stripe-php)[twilio/sdk

A PHP wrapper for Twilio's API

1.6k92.9M272](/packages/twilio-sdk)[knplabs/github-api

GitHub API v3 client

2.2k15.8M187](/packages/knplabs-github-api)[facebook/php-business-sdk

PHP SDK for Facebook Business

90121.9M34](/packages/facebook-php-business-sdk)[meilisearch/meilisearch-php

PHP wrapper for the Meilisearch API

73813.7M114](/packages/meilisearch-meilisearch-php)[google/gax

Google API Core for PHP

263103.1M454](/packages/google-gax)

PHPackages © 2026

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