Authenticate, pull attendance, enrol a fingerprint and open a door โ with copy-paste examples in the language you already use.
Quickstart
Create an account on the developer portal and pair your device by serial number. You'll receive an AuthToken.
Pass AuthToken with each call. It scopes access to your account and the specific device.
Start with GetAttendanceByDate to confirm data is flowing, then move on to enrolment and access control.
https://api.camsunit.com/v3/
# Fetch attendance for a date range curl https://api.camsunit.com/v3/attendance/getbyscandate \ -d "AuthToken=$API_KEY" \ -d "StartDate=2026-06-01" \ -d "EndDate=2026-06-21"
$ch = curl_init("https://api.camsunit.com/v3/attendance/getbyscandate"); curl_setopt_array($ch, [ CURLOPT_RETURNTRANSFER => true, CURLOPT_POSTFIELDS => [ "AuthToken" => $apiKey, "StartDate" => "2026-06-01", "EndDate" => "2026-06-21", ], ]); $data = json_decode(curl_exec($ch), true);
import requests r = requests.post( "https://api.camsunit.com/v3/attendance/getbyscandate", data={ "AuthToken": api_key, "StartDate": "2026-06-01", "EndDate": "2026-06-21", }, ) logs = r.json()["Attendance"]
const res = await fetch( "https://api.camsunit.com/v3/attendance/getbyscandate", { method: "POST", headers: { "Content-Type": "application/x-www-form-urlencoded" }, body: new URLSearchParams({ AuthToken: apiKey, StartDate: "2026-06-01", EndDate: "2026-06-21", }), } ); const { Attendance } = await res.json();
The same pattern applies to every operation โ change the path and parameters.
Common recipes
curl .../v3/user/add \ -d "AuthToken=$K" \ -d "DeviceSN=ZK6A2300583" \ -d "EmployeeCode=1042" \ -d "Name=Priya"
curl .../v3/access/opendoor \ -d "AuthToken=$K" \ -d "DeviceSN=ZK6A2300583" \ -d "DoorNo=1"
curl .../v3/callback/register \ -d "AuthToken=$K" \ -d "Url=https://app/hook" \ -d "Events=attendance.new"
Never embed an AuthToken in client-side code. Proxy calls through your backend.
The gateway retries until you return 200. De-dupe on the event id so retries are safe.
If a device is offline you'll get 409; the command is queued. Poll GetCommandStatus.
Local testing
Your dev machine sits behind a firewall, so the gateway can't reach localhost directly. Expose it with a tunnel, point your Callback URL at the public address, and trigger a test punch.
200# 1. install & authenticate ngrok ngrok config add-authtoken $TOKEN # 2. expose your local app (e.g. port 3000) ngrok http 3000 # Forwarding https://abc123.ngrok-free.app -> localhost:3000 # 3. set that HTTPS URL as your Callback URL
# Cams ngrok helper kit (Windows) # download: developer.camsbiometrics.com/setup/ngrok-helper-kit.rar # then: edit app.properties # add your ngrok authtoken run check_ngrok.bat
Connect a device
Most attendance terminals (ZKTeco, eSSL and compatible) speak the ICLOCK / push protocol. Set the cloud-server fields on the device and it streams attendance to your account โ no PC or local software needed.
Match the device IP / subnet / gateway / DNS to your LAN (or use DHCP) before setting the cloud server.
Pair it on the developer portal and make a live call in minutes.