# Hermoso: Read-only keys · Hermoso developer docs

> Machine-readable twin of https://hermoso.ai/docs/read-only-keys/. Generated from the shipped page. Do not edit by hand.
> Full agent guide: https://hermoso.ai/llms.txt · MCP: https://app.hermoso.ai/mcp

[Docs](https://hermoso.ai/docs/) / Read-only keys

# Read-only keys

A read-only key can read your reports and data, and it cannot change anything. It cannot post, schedule, edit, delete, change an ad, or spend a single credit. Give one to an agent, a dashboard or a teammate who should look but not touch.

## What a read-only key is

Every Hermoso key has an **access** level, chosen when you create it: **Read-only**, **Member** or **Admin**. A read-only key works on every surface (the [MCP server](https://hermoso.ai/docs/mcp/), the [CLI](https://hermoso.ai/docs/cli/) and the [REST API](https://hermoso.ai/docs/api/)) and is sent like any other key:

`Authorization: Bearer hmk_r_…`
Read-only keys begin `hmk_r_`, so you can tell one apart at a glance. The rule is checked on the server, on every request the key makes, before anything runs. It does not depend on the agent behaving well: a request that would change something or cost credits is refused, whatever tool, command or endpoint sent it.

## When to use one

- **An agent that analyses.** A weekly report, a campaign review or a “how did last month go?” question needs the numbers, not the power to post or change a budget.

- **A dashboard or script.** A BI tool, a spreadsheet sync or a cron job that pulls ad and post results.

- **A teammate, client or contractor** who should see results through their own AI assistant without being able to spend your credits or touch your ads.

- **Trying a new agent safely.** Connect it read-only first and see what it does before you hand it a Member key.

## How to create one

- In the app, open **API, MCP & CLI** in the sidebar and go to **Terminal & API keys** (straight there: [app.hermoso.ai/?tab=api-keys](https://app.hermoso.ai/?tab=api-keys), or **Settings → API keys**).

- Press **Create API key** and give it a label you will recognise.

- Choose what it reaches: the **Whole account**, or **One brand** (then pick the brand).

- Under **Access**, choose **Read-only**, then press **Create key**.

**The full key is shown exactly once.** Copy it then. The key list marks it **Read-only**, and you revoke it from the same list. Any person on the account can create a read-only key, because it can do less than they can.

Keys are created in the app, signed in. A key can never create or revoke keys, a read-only key included, so there is no endpoint that takes a key and returns a new one. For an app that connects on a user’s behalf, use OAuth instead (next section).

### Read-only over OAuth

A client connecting to `https://app.hermoso.ai/mcp` with OAuth can ask for a read-only connection by requesting the scope `hermoso.read` **on its own**, without `hermoso.research` or `hermoso.generate`. The consent page then tells the user the app can only read, and the connection is minted as a read-only key: the token answer echoes `hermoso.read`, the access token begins `hmk_r_`, and a refresh stays read-only. A client that asks for the full scopes gets an ordinary connection, exactly as before. The scope is listed in the authorization server metadata at `https://app.hermoso.ai/.well-known/oauth-authorization-server`.

### Using it

For full access in Claude Code you need no key: install with one command, `claude plugin marketplace add hermoso-ai/hermoso && claude plugin install hermoso@hermoso`. Use the read-only setup below only when the agent should read and change nothing.

`# MCP, stdio (Claude Code shown; any client that takes an env var works the same way)
claude mcp add hermoso-readonly -e HERMOSO_TOKEN=hmk_r_… -- npx -y hermoso@0.1.712 mcp

# CLI: from your secret store, nothing written to disk
HERMOSO_TOKEN="$HERMOSO_READ_KEY" hermoso call list_scheduled

# REST API
curl https://app.hermoso.ai/v1/credits -H "Authorization: Bearer hmk_r_…"`
To make a read-only key the CLI’s stored login, pipe it to `hermoso auth login --token -`. The browser sign-in (`hermoso auth login`) creates a full-access key, so use a key you created as read-only when the machine should only read.

## What it can do

Everything that reads and costs nothing, for whatever the key reaches:

- **Results and reports:** ad performance and insights on every connected ad platform (for example `meta_insights` and `google_ads_report`), post performance, website analytics and search reports. Reports that are sent as a request body are allowed too, because they change nothing.

- **Lists:** campaigns, ad sets, ads and audiences, published posts, the schedule (`list_scheduled`), the Library, saved creators and skills.

- **The workspace:** the brand (`get_brand`), connections (`list_connectors`), the credit balance (`hermoso_credits`) and billing status (`billing_status`), models and prices (`hermoso_capabilities`).

- **Choosing a brand:** `use_brand` works, because it only picks which brand the key reads from. A key limited to one brand still never sees another.

- **Finding tools:** `find_tools` works, and `call_tool` runs a read. The full tool list is still visible over MCP; a write tool in it is refused when it is called.

## What it cannot do

- **Publish or schedule:** posting, scheduling, rescheduling, cancelling, replying to comments or messages, deleting a post.

- **Change ads:** creating, editing, activating, pausing or deleting campaigns, ad sets, ads, audiences or budgets on any ad platform.

- **Spend credits:** image, video, voice and text generation, ad research and lookups that cost credits, and X reads (X bills every call). Anything that would charge credits is refused, so a read-only key can never run up a bill.

- **Change the workspace:** the brand, memory, settings, connections, the team (including listing it), keys, billing, plans and credit purchases.

- **Act through a link:** starting an OAuth connection, accepting an invite, unsubscribing, syncing or refreshing data, or any request that asks to act with a flag such as `?refresh=1`.

It fails closed. Anything Hermoso adds later is refused for a read-only key until it has been checked and classified as a read, so a new feature can never quietly give one the power to write.

## The refusal: `403 key_read_only`

A refused request runs nothing and charges nothing. On `/api` the answer is:

`HTTP/1.1 403 Forbidden

{
"error": "This key is read-only: it can view reports and data, but it cannot post, schedule, change anything or spend credits, so nothing was done. To do that, create a Member or Admin key in the Hermoso app (API, MCP & CLI tab), or connect again with full access.",
"code": "key_read_only",
"role": "read"
}`
On `/v1` the same refusal comes in the [API’s error shape](https://hermoso.ai/docs/api/#errors):

`{
"error": { "type": "permission_error", "code": "key_read_only", "message": "This key is read-only: …" },
"request_id": "req_…"
}`
Over MCP, the tool call returns an error result whose text begins `This key is read-only:`. In the CLI, `hermoso call` prints the same sentence and exits with status `1`.

**Branch on the code, and do not retry.** `key_read_only` never clears on its own: the request needs a Member or Admin key. An agent should tell its user that the key is read-only and that nothing was changed, not report a failure or try again.

## How it compares

Access Reads reports and data Posts, schedules, runs ads, generates Manages the team and billing

**Read-only** Yes No (`403 key_read_only`) No

**Member** Yes Yes No (`403 key_member_access`)

**Admin** Yes Yes Yes

A key never has more rights than the person who created it. See [what a key cannot do](https://hermoso.ai/docs/quickstart/#limits) and [Errors](https://hermoso.ai/docs/errors/).
