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. Make sure to choose the network that corresponds to your main internet on your cloud device (e.g. UDM Pro)
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





