Docs / Authentication

Authentication

Every request carries a credential in the header. There are three kinds, and they are deliberately not interchangeable — a key stolen off a recorder in a yard should not open anyone else's cameras.

Authorization: Bearer nv_site_4f21ac8e

Credential types

Site key Bound to one location. Can open sessions and push segments for that location only. Lives on the recorder at the site.
Operator token Issued to a person. Can view live and archived footage across the locations their role covers. Expires after 12 hours of inactivity.
Export token Single use, created for one export job, valid 30 minutes. Every use is written to the access log.

Rotation

Site keys can be rotated without visiting the site: issue a new one, and the previous key keeps working for 24 hours so the recorder can pick up the change on its next configuration poll. A compromised key is revoked instead — that takes effect immediately and drops any open session using it.

Errors

401 — no usable credential:

{
  "error": "unauthorized",
  "message": "Key missing or not recognised"
}

403 — credential is valid but not for this location:

{
  "error": "forbidden",
  "message": "Key nv_site_4f21ac8e is not bound to plant gdansk-dc3"
}