Vigiora

Această pagină nu este încă disponibilă în Română. Este afișată în engleză.

API keys

Create an API key so scripts and integrations can call your Vigiora server as you, then revoke it when it's no longer needed.

În aplicație: /api-keys

An API key lets a script or integration, such as Home Assistant, call your server's API v1 (and the internal API) as you. It has your role and your camera permissions, never more.

The API keys page lists your keys and when each was last used.

Everyone can create keys for themselves. Admins can also see and revoke other people's keys.

Create a key#

  1. Open API keys

    Open Settings → People and access → API keys, then New key.

  2. Name it

    Enter a Name that says where you'll use it, for example Home Assistant.

  3. Choose read-only or read-write

    Leave Read-only ticked unless the integration needs to change things.

  4. Choose when it expires

    Pick Expires: Never, 7 days, 30 days, 90 days or 1 year.

  5. Create it

    Click Create key.

  6. Copy the key now

    Click Copy and store the key in your integration or a password manager. Then click I've copied it.

New keys are read-only by default.

A key looks like vgk_xxxxxxxx_xxxxxxxxxxxxxxxx. The first part (vgk_ and the key ID) is its prefix. The list shows the prefix so you can tell keys apart.

Options#

OpțiuneDescriereImplicit
Name1 to 100 characters. Only for you to recognise the key.—
Read-onlyOnly GET requests are allowed. Untick to let the key make changes with your permissions.On
ExpiresNever, 7 days, 30 days, 90 days or 1 year. An expired key stops working.Never

You can have up to 20 active keys.

Use a key#

Send it in a header:

Terminal
curl -s https://yourname.vigiora.com/api/v1/cameras \
  -H "Authorization: Bearer vgk_xxxxxxxx_xxxxxxxxxxxxxxxx"

or X-API-Key: vgk_xxxxxxxx_xxxxxxxxxxxxxxxx. See the API quickstart for what you can call.

What a key can't do#

  • Keys can't manage keys, users, groups or passwords, and can't change Vigiora cloud, remote access or billing settings.
  • A key never sees camera passwords: they come back as REDACTED.
  • A key stops working at once if it's revoked or expires, or if its user is disabled. Open live streams are closed within 30 seconds.

The key list#

ColumnMeaning
NameThe name you gave it, with a Read-only or Read-write badge and the prefix.
UserWhose key it is. Shown to admins with All users ticked.
CreatedWhen it was created.
Last usedThe last request made with it, updated about once a minute.
ExpiresThe expiry date, or Never.
Statusactive, expired or revoked.
Ask before actionsWhether AI agents using the key must get your approval before risky actions: Use server setting, Always ask or Never ask. See Human in the loop. From 1.6.9.

AI agents and human in the loop#

When an AI agent uses a key through the MCP server, the key's Ask before actions menu decides whether the agent asks you before it moves cameras, scans the network or changes settings. New keys use the server setting, which is on by default. While the server setting is on, only admins can choose Never ask. Scripts calling the REST API are never prompted. See Human in the loop.

Revoke a key#

  1. Find the key

    In Settings → People and access → API keys, find the key. Admins can tick All users to see everyone's keys.

  2. Revoke it

    Click Revoke and confirm. Anything using the key stops working immediately.

Too many wrong keys#

Repeated requests with wrong keys from one address are slowed down. The server answers 429 with a Retry-After header saying how many seconds to wait.

Editează această pagină pe GitHub