---
title: "API keys"
description: "Create an API key so scripts and integrations can call your Vigiora server as you, then revoke it when it's no longer needed."
url: https://vigiora.com/docs/developers/api-keys
updated: 2026-11-25T11:37:01.000Z
---

# 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.

An API key lets a script or integration, such as Home Assistant, call your server's [API v1](https://vigiora.com/docs/developers/api-v1) (and the [internal API](https://vigiora.com/docs/developers/rest-api)) as you. It has your role and your camera permissions, never more.

> **Keys with scopes**
>
> Keys made on this page are **read-only** or **read-write** by default. On API v1 they get matching scopes automatically. To give an integration only some permissions, for example only acknowledging alerts, create a key **with scopes**: from version 1.6.7, tick **Limit to specific scopes** in the form and choose them, or use `POST /api/v1/api-keys`. Such keys work on API v1 and its MCP endpoint only. See [Authentication and scopes](https://vigiora.com/docs/developers/api-authentication). Keys without scopes never get the Analytics, floor-plan or Home Assistant device scopes (from 1.6.13): an AI agent using a read-only key from this page sees no Analytics tools. Tick **Limit to specific scopes** and choose `analytics:read` for that.

![The API keys page listing keys with name, read-only badge, created, last used, expiry and status](https://vigiora.com/docs/img/developers/api-keys-1-list.png)

*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**.

![The Create API key form with the Name, Read-only and Expires fields](https://vigiora.com/docs/img/developers/api-keys-2-create.png)

*New keys are read-only by default.*

> **You see the key only once**
>
> The full key is shown only when you create it. If you lose it, revoke it and create a new one.

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

| Option | What it does | Default |
| --- | --- | --- |
| Name | 1 to 100 characters. Only for you to recognise the key. |  |
| Read-only | Only GET requests are allowed. Untick to let the key make changes with your permissions. | On |
| Expires | Never, 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:

```bash
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](https://vigiora.com/docs/developers/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

| Column | Meaning |
| --- | --- |
| **Name** | The name you gave it, with a **Read-only** or **Read-write** badge and the prefix. |
| **User** | Whose key it is. Shown to admins with **All users** ticked. |
| **Created** | When it was created. |
| **Last used** | The last request made with it, updated about once a minute. |
| **Expires** | The expiry date, or **Never**. |
| **Status** | active, expired or revoked. |
| **Ask before actions** | Whether 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](https://vigiora.com/docs/developers/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](https://vigiora.com/docs/developers/mcp), 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](https://vigiora.com/docs/developers/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.

> **Tip**
>
> Use one key per integration. Then you can revoke one without breaking the others, and **Last used** tells you which integrations are still active.

## 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.

---

Source: https://vigiora.com/docs/developers/api-keys · Last updated 25 Nov 2026, 11:37 UTC
