With the Unifi API Integration your hotspots can fully utilize advanced login features like Guest Plans or Ad-Based login and provide guests the correct rate-limiting settings for the method used.
The following instructions outline how to setup a Ubiquiti UniFi network for the Marketing4WiFi Platform utilizing the API integration. This guide assumes that your Unifi controller is already operational and on a live network with adopted Access Points. Please make sure any firewall rules, web content filters, and other security measures have been configured to interface with the platform.
- Add your Ubiquiti Unifi Access Points to the Marketing4WiFi Dashboard using the Ubiquiti Unifi API gateway type. You will need to enter a portal URL where the controller can be reached as well as a valid Administrator Username and Password before pressing ‘Test API Credentials’ to generate a list of possible sites to select from. Be sure to Submit the page!
- Log into the controller.
- Launch the correct site and click the settings icon in the bottom left.
- On the menu to the left click Guest Control and configure with
- Enable Guest Portal: Checked
- Authentication: Hotspot
- Promotional URL: Select oneUS-A Redirect URL
https://splash.4wifi.net/hotspotlogin.php?res=success
You can confirm your platform environment under Operator Customizations.
US-B Redirect URLhttps://splash.4wifi-e2.net/hotspotlogin.php?res=success
You can confirm your platform environment under Operator Customizations.
- Redirection-
- Use Secure Portal: Unchecked
- Redirect Using Hostname: Unchecked
- Enabled HTTPS Redirection: Unchecked
- Enable encrypted redirect URL: Unchecked
- Template Engine: Angular JS
- Override Default Templates: Checked
- Pre-Authorization Access: Add all the Default walled garden entries.
- Press ‘Apply Changes’ to save.
- On the menu to the left click Wireless Networks.
- Create a new Wireless Network or Edit your existing Guest WiFi network.
- Check the Guest Policy box to enable the Guest Control settings.
- Final Step- Place the two HTML files from your dashboard’s Ubiquiti Unifi API gateway page onto your Unifi controller hotspot directory for the site code used in step one.
Typical file location examples are below.(depending on the UniFi controller):
Please note you will typically use your site auto generated folder name instead of default.
Dream Machine: /data/unifi/data/sites/default/app-unifi-hotspot-portal
CloudKey: /srv/unifi/data/sites/default/app-unifi-hotspot-portal
Windows: C:\Users\<username>\Ubiquiti UniFi\data\sites\default\app-unifi-hotspot-portal
MAC: ~/Library/Application Support/UniFi/data/sites/default/app-unifi-hotspot-portal
Linux: /usr/lib/unifi/sites/data/default/app-unifi-hotspot-portal
- Add your Ubiquiti Unifi Access Points to the Marketing4WiFi Dashboard using the Ubiquiti Unifi API gateway type. You will need to enter a portal URL where the controller can be reached as well as a valid Administrator Username and Password before pressing ‘Test API Credentials’ to generate a list of possible sites to select from. Be sure to Submit the page!
Troubleshooting Splash page
- If devices are redirected but the device hangs on the controller url please ensure port 8880 is open to the Unifi Controller.
- If devices are redirected and port 8880 is open to the controller please ensure that the ‘Secure Portal’ option is turned OFF.
- If devices present an certificate error please ensure https redirection is disabled.
- If a hotspot deactivated message is presented please ensure all the AP MACs have been added as gateways to the correct hotspot.
- If devices are redirected to the splash page URL but the page fails to load please ensure the Allowed Authorization Access list has been properly configured.
- If the internal captive portal from the Unifi controller is displayed instead of the hotspot splash page make sure ‘Override Default Templates’ is ON and the index and auth files have been placed on the correct site directory.