# Connect Ubiquiti UniFi

> Create a UniFi Site Manager API key and connect your UniFi consoles and sites to Vigilbase OS read-only.

Source: https://docs.vigilbase.com/os/integrations/unifi

The Ubiquiti UniFi connector reads your consoles, sites, devices and network settings through UniFi Site Manager. It is read-only: Vigilbase only ever sends read requests with your key and cannot change anything in UniFi.

> [!NOTE]
> This connector is **Alpha**: built and tested in isolation, not yet proven against a live account.

## Before you start

- Use the UniFi account that owns the consoles you want to monitor, or a UniFi organisation API key. A Super Admin can see consoles but cannot read their network settings through UniFi's API.
- Full detail needs UniFi OS 5.0.3 or later on each console. Older consoles still report devices, firmware and site health.
- In Vigilbase OS you need the `integration.manage` and `credential.manage` permissions.

## Create an API key

:::steps
1. **Sign in to UniFi Site Manager** at `https://unifi.ui.com/` with the account that owns the consoles.
2. **Open Settings › API Keys and choose Create New API Key.** Some accounts show **API** in the left-hand menu instead, with a **Create API Key** button.
3. **Name the key** `Vigilbase OS`. UniFi keys have no permission settings.
4. **Copy the key straight away.** UniFi shows it only once. If you lose it, delete the key in Site Manager and create a new one.
:::

## Connect it to Vigilbase OS

:::steps
1. **Open Integrations, choose Add connection and select Ubiquiti UniFi.**
2. **Paste the key into Site Manager API key.**
3. **Choose Connect read-only.** Vigilbase finds your consoles and sites.
4. **Choose which consoles and sites to monitor,** then choose datasets.
:::

Optionally, turn on **Guest voucher details** to record when hotspot vouchers were created, used and expire, so unusual guest access stands out. It is off unless you turn it on.

Account details that UniFi returns with each console, such as email, name and roles, are removed before anything is stored.
