> ## Documentation Index
> Fetch the complete documentation index at: https://cpaas.fireflo.au/llms.txt
> Use this file to discover all available pages before exploring further.

# Keys and scopes

> Live and test keys, what a key may do, where it may be used from, and how to retire one.

Every request carries one key: `Authorization: Bearer ff_live_…`. The key is the account
— everything it reads and changes is that account's, and nothing else's.

## Making a key

**1. Open Developer Tools → API keys**

Owners and Admins can make keys. **Developer Tools** is the last entry in the side menu.

**2. Name it, and choose what it may do**

Give each system its own key ("Billing server", "Website") with only the scopes it
needs. You can't give a key a scope your own roles don't allow: each scope stands for
the panel permission of the same thing.

**3. Choose where it may be used from (optional)**

Addresses or ranges such as `203.0.113.0/24`. A request from anywhere else is
refused with `address_not_allowed`.

**4. Copy it**

The whole key is shown **once**. OMNI keeps only a fingerprint of it, so it can't be
shown again — make a new one if it's lost.

An account may have **25 keys in use** at a time. Past that, revoke one it no longer needs
before making another.

![The API keys list with each key's name, scopes, kind and when it was last used.](https://mintcdn.com/fire-flo-omno/PE0OUbPWjBA9XF0k/images/shots/developers-keys-light.webp?fit=max\&auto=format\&n=PE0OUbPWjBA9XF0k\&q=85\&s=e1c29b0e826160dffbd365810daf808a)

Developer Tools → API keys

## Live and test keys

| | Live `ff_live_…` | Test `ff_test_…` |
| :- | :- | :- |
| `POST /v1/messages` | Reaches real people, and is charged | **Never reaches a channel.** The message succeeds at once on its first step with the code `test` |
| Replies, calls, broadcasts and every other request that would reach people | Reach real people, and are charged | **Nothing is sent or charged.** The answer is `202` with `"test": true` and `"sent": false` |
| Contacts, templates, webhooks | Real | Real — a test key changes your account's data like a live one |
| Everything else | The same | The same |

Build against a test key, then switch the key, not the code.

## Scopes

A key may only do what its scopes allow. A request outside them is refused with
`scope_missing`, naming the scope it needed. The full list is on
[Scopes and events](https://cpaas.fireflo.au/api-reference/scopes-and-events.md); the common ones:

| Scope | Lets the key |
| :- | :- |
| `messages:send`, `messages:read` | Send messages with failover; read them |
| `contacts:read`, `contacts:write` | Find, add and change contacts and their consent |
| `conversations:read`, `conversations:write` | Read the Inbox; reply, close, assign, label |
| `templates:read`, `templates:write` | Manage unified templates |
| `calls:read`, `calls:write` | Read calls; ring people |
| `senders:read`, `usage:read` | See senders; see usage and balance |
| `webhooks:read`, `webhooks:write` | Manage webhook endpoints |
| `whatsapp.templates:*`, `sms.senders:*`, `sms.templates:*` | A channel's own features ([extensions](https://cpaas.fireflo.au/developers/channel-extensions.md)) |

`GET /v1/me` needs no scope: any key may ask who it is.

## Retiring a key

**Revoke** it in Developer Tools → API keys. It stops working at once. A key can also be
given an expiry when it is made; after it, requests are refused with `invalid_key`.

Every request a key makes is in **Developer Tools → Requests** for 30 days — the time, the
key, the call, the answer and its request id. Developer Tools' own screens work through the
API as the person using them; those requests are under **Panel** on the same screen,
named for that person, and kept apart from **Your systems**.


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.