PHPackages                             art-of-wifi/unifi-network-application-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. art-of-wifi/unifi-network-application-api-client

ActiveLibrary[API Development](/categories/api)

art-of-wifi/unifi-network-application-api-client
================================================

A PHP API client for the official UniFi Network Application API, built on Saloon with a fluent interface for easy integration

v1.1.0(3mo ago)785—6.7%[1 issues](https://github.com/Art-of-WiFi/unifi-network-application-api-client/issues)MITPHPPHP ^8.2

Since Feb 17Pushed 3mo ago1 watchersCompare

[ Source](https://github.com/Art-of-WiFi/unifi-network-application-api-client)[ Packagist](https://packagist.org/packages/art-of-wifi/unifi-network-application-api-client)[ Docs](https://github.com/Art-of-WiFi/unifi-network-application-api-client)[ RSS](/packages/art-of-wifi-unifi-network-application-api-client/feed)WikiDiscussions main Synced today

READMEChangelog (2)Dependencies (10)Versions (3)Used By (0)

UniFi Network Application API Client
====================================

[](#unifi-network-application-api-client)

[![Latest Version on Packagist](https://camo.githubusercontent.com/1953e783f0ce7784de47df91a82f05092e913d126d2616826c4d7e10e8d41c65/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f6172742d6f662d776966692f756e6966692d6e6574776f726b2d6170706c69636174696f6e2d6170692d636c69656e742e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/art-of-wifi/unifi-network-application-api-client)[![PHP Version](https://camo.githubusercontent.com/f8d778e410e86a9b95767740b61881a74a1b839a0ce5346f62bab1b1a858af46/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f7068702d762f6172742d6f662d776966692f756e6966692d6e6574776f726b2d6170706c69636174696f6e2d6170692d636c69656e742e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/art-of-wifi/unifi-network-application-api-client)[![License](https://camo.githubusercontent.com/c323d58e8a9135bb779292b63283f7c1614e483ee576f0d1028080d0e5a58c43/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f6c2f6172742d6f662d776966692f756e6966692d6e6574776f726b2d6170706c69636174696f6e2d6170692d636c69656e742e7376673f7374796c653d666c61742d737175617265)](LICENSE)[![Total Downloads](https://camo.githubusercontent.com/4cd002a2f068f4ee203f5219a532bb801928666877fb7a39100b30253ea8e273/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64742f6172742d6f662d776966692f756e6966692d6e6574776f726b2d6170706c69636174696f6e2d6170692d636c69656e742e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/art-of-wifi/unifi-network-application-api-client)

A modern PHP API client for the official UniFi Network Application API, built on [Saloon](https://docs.saloon.dev/) with a fluent interface for easy integration and powerful features.

This client provides a clean, intuitive way to interact with your UniFi Network Application, supporting all major operations including site management, device control, client monitoring, network configuration, WiFi management, and more.

It is not a direct successor to the [UniFi API client](https://github.com/Art-of-WiFi/UniFi-API-client) which has been developed for the legacy, "unofficial" UniFi API. At this point in time, the "unofficial" API supports more endpoints than the official API. If your integration requirements can be met with the official API, we recommend using this client. For a richer set of features, we currently recommend using the [legacy UniFi API client](https://github.com/Art-of-WiFi/UniFi-API-client).

Features
--------

[](#features)

- Built on Saloon v3 for robust HTTP communication
- Fluent interface with method chaining for elegant code
- Full support for the official UniFi Network Application API (v10.1.84+)
- Comprehensive coverage of all API endpoints
- Strongly typed using PHP 8.1+ features
- Easy to use for beginners, flexible for advanced users
- Well-documented with inline PHPDoc for IDE auto-completion
- PSR-4 autoloading
- Sends a `User-Agent` header with every request for easy troubleshooting

Requirements
------------

[](#requirements)

- PHP 8.1 or higher
- Composer
- A UniFi OS Server or UniFi OS console with API key access to the Network Application
- Network access to your UniFi Controller

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

[](#installation)

Install via Composer:

```
composer require art-of-wifi/unifi-network-application-api-client
```

Authentication &amp; Prerequisites
----------------------------------

[](#authentication--prerequisites)

### Generating an API Key

[](#generating-an-api-key)

You **must** generate an API key from your UniFi Network Application to use this client:

1. Log into your UniFi Network Application
2. Navigate to **Settings** → **Integrations** or straight to **Integrations** from the sidebar with the latest versions of the UI
3. Click **Create New API Key**
4. Give it a descriptive name and save the key securely
5. Use this key when initializing the client

### Important Notes

[](#important-notes)

- API keys are site-specific and tied to your user account
- The account generating the API key must have appropriate permissions
- API keys can be revoked at any time from the Integrations page
- For local controllers with self-signed certificates, you may need to disable SSL verification (not recommended for production)

Quick Start
-----------

[](#quick-start)

Here's the simplest example to get you started:

```
