# Keys and authentication

How keys, scopes, and live or test mode work.

Every request sends a key in the `Authorization` header.

```bash
Authorization: Bearer wfb_live_xxxxxxxx
```
## One key, one account

A key reads one brand account. If you manage several brands, use one key for each account.

You create keys yourself in the Wefluence app, under **Settings** (Pengaturan), then **API key**. Give the key a name and tick the permissions it needs.

## Scopes

Scopes decide which data a key can read.

| Scope | Contents | Default |
| --- | --- | --- |
| `campaigns:read` | Campaign list, details, and content and views summaries | Yes |
| `content:read` | Content and creators per campaign | Yes |
| `finance:read` | Remaining budget, amounts paid, service fees, and invoices | No |

Without `finance:read`, campaign stats are still returned, without the `money` block.

## Live and test

| Prefix | Reads |
| --- | --- |
| `wfb_live_` | Your brand account |
| `wfb_test_` | A sample account, for trying the API without touching real data |

## Expiry

Keys are valid for 12 months, and one account can have up to 5 active keys. To rotate a key, create a new one, move your systems over, then revoke the old one. A revoked key stops working immediately and cannot be turned back on.

See also [how to keep keys safe](https://docs.wefluence.app/en/guides/key-safety/).
