https://store.ui.com/us/en/products/ua-sk-gateImportant:
- Ensure all APIs listed in automations are protected with
10.0.0.0/8access. - I removed the API token, but you will need to edit the
- Host IP
- Group ID
- Site ID
- anything else specfic to your enviroment
- Log in to Unifi Access.
- Navigate to General -> API Token.
- Create a new token and select all permissions.
Located in the User Folder. Ensure necessary permissions are set.
./Add_PIN_and_Group_To_User.sh <email> <PIN>./Create_User.sh <first_name> <last_name> <email> <new_pin>./Create_Users_From_CSV.sh <csv_file>Located in the Visitor Folder. Ensure necessary permissions are set.
Still requires QR Code to be enabled and linked to existing user
./24-7-Multiple_Visitor_BasedOff_NON_Resident.sh <visitors_file.txt>./24-7-Multiple_VisitorBasedOff_Resident.sh <visitors_file.txt>./24-7-Single_VisitorBasedOff_NON_Resident.sh <First> <Last> <email>./24-7-Single_VisitorBasedOff_Resident.sh <email>https://core-config-gfoz.uid.alpha.ui.com/configs/unifi-access/api_reference.pdfcurl -s -k 'https://10.10.10.1:12445/api/v1/developer/users' -H 'Authorization: Bearer <token>' | \
jq '.data[]'curl -s -k 'https://10.10.10.1:12445/api/v1/developer/doors' -H 'Authorization: Bearer <token>' | \
jq '.data[]'curl -s -k 'https://10.10.10.1:12445/api/v1/developer/user_groups' -H 'Authorization: Bearer <token>' | \
jq '.data[]'curl -X GET 'https://api.ui.com/ea/hosts?pageSize=10' \
-H 'Accept: application/json' \
-H 'X-API-KEY: <token>' | jq '.data[]'curl -s -k 'https://10.10.10.1:12445/api/v1/developer/visitors' -H 'Authorization: Bearer <token>' | \
jq '.data[]'