Goal
You want to scan daily attendance badges at gates and record the scan instantly.
What you need
- An API key with attendance:write.
- Recommended: a proxy server endpoint to keep secrets off devices.
Request
Record attendance
bash
Proxy endpoint (recommended)
Gate devices should never store your Confera API key. Put a tiny server endpoint in front. This also lets you normalize inputs, add logging, and handle duplicates consistently.
Next.js Route Handler: /api/gate/attendance
ts
Operations
- Use one key per gate device/team.
- Log the location field to trace scans.
- If a device is lost, revoke only its key.
- Treat 409 duplicates as success (fast gate UX).
- If you hit 429, slow down scans and retry with backoff.