Home / Developers

Build in an afternoon

Authenticate, pull attendance, enrol a fingerprint and open a door โ€” with copy-paste examples in the language you already use.

Quickstart

Three steps to your first call

Get an API key

Create an account on the developer portal and pair your device by serial number. You'll receive an AuthToken.

Authenticate every request

Pass AuthToken with each call. It scopes access to your account and the specific device.

Call an endpoint

Start with GetAttendanceByDate to confirm data is flowing, then move on to enrolment and access control.

Base URL

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

Copy, paste, ship

POST

Enrol a user

curl .../v3/user/add \
 -d "AuthToken=$K" \
 -d "DeviceSN=ZK6A2300583" \
 -d "EmployeeCode=1042" \
 -d "Name=Priya"
POST

Open a door

curl .../v3/access/opendoor \
 -d "AuthToken=$K" \
 -d "DeviceSN=ZK6A2300583" \
 -d "DoorNo=1"
CALLBACK

Register a webhook

curl .../v3/callback/register \
 -d "AuthToken=$K" \
 -d "Url=https://app/hook" \
 -d "Events=attendance.new"
🔒

Keep keys server-side

Never embed an AuthToken in client-side code. Proxy calls through your backend.

🔄

Make webhooks idempotent

The gateway retries until you return 200. De-dupe on the event id so retries are safe.

Handle queued commands

If a device is offline you'll get 409; the command is queued. Poll GetCommandStatus.

Local testing

Test callback URLs from your machine

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.

  • Always use an HTTPS callback URL
  • Keep the tunnel running for the whole test session
  • Free ngrok URLs change on restart โ€” update the callback when they do
  • Make your handler idempotent โ€” the gateway retries until it gets a 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

Point a terminal at the gateway

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.

On the device: Menu → COMM → Cloud Server / ADMS, enter the server below, then confirm the server-connection icon appears on the home screen.

Device server settings

Server IP
152.53.172.248
Port
8123 (developer / testing) · 80 (production)
Enable Domain Name
OFF
Proxy Server
OFF
Protocol
ICLOCK / Push

Match the device IP / subnet / gateway / DNS to your LAN (or use DHCP) before setting the cloud server.

Have your device serial handy?

Pair it on the developer portal and make a live call in minutes.