Generating a UniFi API Key for Captive WiFi Integration

How to Generate a UniFi API Key

This guide explains how to create a secure API key inside your UniFi Network controller.

The API key allows external systems such as Captive WiFi to connect securely to your UniFi controller without using your admin username and password.

Using an API key is the recommended and most secure method


Before You Start

You must:

• Be logged into the UniFi Network application

• Have admin access to the controller

• Be running a UniFi OS version that supports API keys

If you do not see the “Integrations” section, your controller may need updating.


Step 1 – Login to UniFi

Access your controller:

• Via https://unifi.ui.com

or

• Via your local controller address, for example https://192.168.1.1

Open the UniFi Network application.


Step 2 – Navigate to Integrations

Inside the UniFi Network app:

  1. Go to Settings

  2. Select System

  3. Click Integrations

You should see a section labelled API Key.


Step 3 – Create the API Key

  1. Click Create API Key

  2. Enter a name, for example:

    Captive WiFi Integration

  3. Confirm creation

UniFi will now generate an API key.


Important

You may only see the API key once.

Copy it immediately and store it securely in a password manager.

If you lose it, you will need to delete it and generate a new one.


Step 4 – Provide the API Key to Your Integration Platform

In your external system (for example Captive WiFi):

• Enter your UniFi controller URL

• Paste the API key

• Test the connection

• Save the configuration


Step 5 – Install the API Key


Security Best Practice

• Do not share API keys over email

• Rotate API keys periodically

• Delete unused API keys

• Do not use your cloud UI.com login for integrations


Troubleshooting

If you cannot see the API Key section:

• Ensure your UniFi OS is updated

• Confirm you are inside the Network application, not the main OS dashboard

• Confirm your admin account has sufficient permissions


Was this article helpful?