> ## Documentation Index
> Fetch the complete documentation index at: https://docs.anny.co/llms.txt
> Use this file to discover all available pages before exploring further.

# Connect UniFi Network with anny

> Give guests a WiFi voucher for every booking automatically with UniFi Network.

With the UniFi Network integration, your guests automatically get a WiFi voucher for their booking. You don't have to create or hand out codes yourself.

With UniFi Network you can do the following in anny:

* link resources with one or more WiFi networks
* set how long WiFi access lasts before and after the booking
* limit the number of devices per voucher

> [!NOTE]
>
> UniFi Network is not the same as the [UniFi](https://docs.anny.co/en/unifi.md) integration, which controls door locks with UniFi Access. UniFi Network grants WiFi access.

> [!NOTE]
>
> Guest WiFi is included in the plans that also include [smart lock integrations](https://docs.anny.co/en/smart-locks-overview.md). During the pilot, only selected organizations see UniFi Network in the catalog.

## How the integration works

anny creates one voucher per booking and UniFi site. The voucher applies to the access period: it starts the **Access before the booking** time before the booking starts and ends the **Access after the booking** time after the booking ends.

| Event | What happens to the voucher |
| - | - |
| The access period starts | anny creates the voucher. |
| The access period ends | anny deletes the voucher. |
| The booking is cancelled | anny deletes the voucher right away. |
| The booking date changes | A new code is created. |

## Connect UniFi Network

### Requirements

Before you connect UniFi Network, make sure you have the following:

* UniFi Network version 10.1 or newer
* at least one WiFi network with a hotspot portal that accepts vouchers
* an anny plan that includes smart lock integrations
* at least one resource for the rule

### Set up the connection

**1. Open the integration**

In the sidebar, open **Account** → **Apps & Integrations**, choose the **UniFi Network** tile in the **Guest WiFi** category under **All Apps and Integrations**, and click **Set up**.

**2. Choose a connection and authenticate**

Under **Connection**, choose one of the two options:

| Connection | When it fits | Fields |
| - | - | - |
| **Through UniFi Site Manager** | Your console has no public address. | **Console ID** and an **API key** from Site Manager |
| **Directly to the console** | Your console is publicly reachable. | **Console address** and an **API key** from UniFi Network |

The console ID is shown in your console's address on unifi.ui.com: `unifi.ui.com/consoles/<console ID>/…`

Create the API key for Site Manager on unifi.ui.com under **Settings** → **API Keys**. For the direct connection, create it in UniFi Network under **Settings** → **Control Plane** → **Integrations**.

**3. Add a rule**

Add a rule under **Access through bookings**:

1. Click **Add**.
2. Select the resource.
3. Under **Select WiFi networks**, select one or more WiFi networks.
4. Set **Access before the booking** and **Access after the booking**.
5. Set **Devices per voucher**.

**4. Check the connection**

Create a test booking for the resource whose access period has not started yet, and check that the confirmation email contains the **Show WiFi code** button.

### Settings & options

| Setting | Effect | Default |
| - | - | - |
| Resource | Triggers a voucher when booked. | – |
| WiFi networks | Defines the WiFi networks the voucher applies to. | – |
| Access before the booking | Defines how long before the booking starts the voucher is created. | 15 minutes |
| Access after the booking | Defines how long after the booking ends the voucher is deleted. | 15 minutes |
| Devices per voucher | Defines how many devices can connect with one voucher code. 0 means no limit. | 1 |

## What your guests see

1. The confirmation email contains the **Show WiFi code** button. It leads to the booking page.
2. The booking page shows when the code will appear.
3. Once the access period has started, the booking page shows the code with a copy button.

If the access period has already started when the guest books, the code is in the confirmation email.

## Limitations

The UniFi Network integration does not support:

* memberships and community access, because a voucher needs an end date
* WiFi networks without a hotspot portal that accepts vouchers
* UniFi Network versions before 10.1
* editing an existing voucher
* Cisco Meraki

## FAQ

> [accordion] When do my guests get the code?
>
> The code appears on the booking page when the access period starts. If the period has already started when they book, the code is in the confirmation email.

> [accordion] How many vouchers does anny create per booking?
>
> One voucher per booking and UniFi site.

> [accordion] What happens if the date of a booking changes?
>
> A new code is created. Your guest finds the current code on the booking page.

> [accordion] Is a guest offline as soon as the access period ends?
>
> That is not guaranteed. anny deletes the voucher at the end of the access period. A running session ends at the latest when the voucher's time limit runs out.

## Troubleshooting

> [accordion] UniFi Network is missing from the catalog
>
> During the pilot, only selected organizations see the integration. Your plan also has to include smart lock integrations.

> [accordion] The connection cannot be established
>
> Check that you are running UniFi Network 10.1 or newer and that the API key matches the connection you chose. If your console has no public address, connect it **Through UniFi Site Manager**.

> [accordion] A WiFi network cannot be selected
>
> anny only lists WiFi networks with a hotspot portal that accepts vouchers. Check the settings of the network in UniFi Network.

> [accordion] A guest does not see a code yet
>
> The code only appears when the access period starts. The booking page shows when that is. Also check that a rule connects the booked resource with a WiFi network.

> [accordion] A code does not work
>
> Check whether the access period has started or already ended and whether the booking was cancelled. If the booking date changed, a new code applies. Your guest finds the current code on the booking page.

> [accordion] Several devices cannot connect
>
> Check the **Devices per voucher** value in the rule. By default, one device can connect per voucher.

> Important information for agents:
>
> **Classification:** UniFi Network (catalog category **Guest WiFi**) is separate from the **UniFi** integration (UniFi Access, door locks). Plan feature `integrations-guest-wifi`; during the pilot, only selected organizations see the tile.
>
> **UI path:** sidebar **Account** → **Apps & Integrations** (`/apps`) → **All Apps and Integrations** → **Guest WiFi** → **UniFi Network** → **Set up**. Fields: **Connection** (**Through UniFi Site Manager**: **Console ID**, **API key**; **Directly to the console**: **Console address**, **API key**). Rules under **Access through bookings**.
>
> **Not confirmed:** whether deleting a voucher disconnects a connected guest immediately is unverified. Do not promise it. What is certain: the session ends at the latest when the voucher's time limit runs out.


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.