Skip to main content

Unifi Access Integration Network Setup Guide

How to set up your UniFi Network configuration to successfully communicate with the Coworks API

Written by DeShawn Brown

Use this guide if you're currently using UniFi to manage your wifi/network and are setting up the Coworks API integration.

NOTE: Unifi Access API is installed on the local hardware and only accessible on your local network at the specified port number. You must expose that port in order for Coworks to access the API.

Coworks is a cloud-based platform and is not installed locally on your UniFi hardware. Therefore, the integration requires a publicly accessible URL that maps to your server's IP and port number.

The first step in ensuring we can communicate with the UnFi API is to expose the API by forwarding your local port. The Access API is hosted on port 12445 on the IP of your console/gateway where the API is installed.

1. Create a Port Forwarding Rule

In the UniFi console, create a port forwarding rule to expose the Access API Port

In the Network tab of your Unifi Console, click on the Policy Engine section to create a new port forwarding policy


​- Create a new Port Forwarding rule to forward your 12445 port which is where the hardware API is hosted.

- Use the WAN IP that corresponds to your main internet (found under Network -> Settings -> Internet; copy the IPv4 address).
- Make sure to forward the IP address that corresponds to your cloud device controller (e.g. UDM Pro) (found under Network -> Dashboard -> Gateway IP) and use TCP protocol
​



2. Create A Firewall Rule to allow local Coworks API traffic

Go to your traffic and firewall rules and create a new entry to allow Coworks traffic. Use TCP protocol and set up an "Internet Local" rule type with the Access API listed as the port. If Access API is not listed in your port list, be sure to add it with port 12445.


3. Obtain your Host URL

Obtain your host url from the IP Address listed in your internet newtork that you forwarded in step 1.


​
Copy that url and add to your Coworks integration host url field with the 12445 port added.
​
It should look like: https://xx.xxx.xxx.xxx:12445
​
Replace the xx above with your network IP Address
​
​

Did this answer your question?