# Log in to Resend

You were sent here because you opened a page of the Resend dashboard without a signed-in session. The dashboard is built for people in a browser. An agent can't log in to it, and you don't need to: everything it shows is available through the MCP server (which signs the user in with OAuth), and through the CLI and the API (which use an API key).

Don't ask the user for their password or a session cookie, and don't try to automate the login form.

## Do the same work without the dashboard

Use whichever of these is already set up. If none is, ask the user to set one up (see [Credentials](#credentials)).

1. **MCP server**: if you are an MCP client, add `https://mcp.resend.com/mcp`. It signs the user in with OAuth, so you never see a key. Discovery: `https://resend.com/.well-known/mcp.json`.
2. **CLI**: if you can run shell commands, use `resend`. Install it with `npm install -g resend-cli` (or `curl -fsSL https://resend.com/install.sh | bash`), then run `resend doctor` to check auth. Every command takes `--json` for machine-readable output.
3. **API**: call `https://api.resend.com` with `Authorization: Bearer $RESEND_API_KEY`. Reference: [docs](https://resend.com/docs/llms.txt), [OpenAPI spec](https://resend.com/openapi.yaml).

## Dashboard pages and their equivalents

If the user gave you a dashboard link, the ID at the end of it (for example `/domains/<id>` or `/emails/<id>`) is the same ID the API, CLI and MCP tools take.

| Dashboard page | CLI | API |
| --- | --- | --- |
| `/emails`, `/emails/<id>` | `resend emails list`, `resend emails get <id>` | `GET /emails`, `GET /emails/{id}` |
| `/emails/receiving` | `resend emails receiving list` | `GET /emails/receiving` |
| `/domains`, `/domains/<id>` | `resend domains list`, `resend domains get <id>` | `GET /domains`, `GET /domains/{id}` |
| `/api-keys` | `resend api-keys list` | `GET /api-keys` |
| `/broadcasts`, `/broadcasts/<id>` | `resend broadcasts list`, `resend broadcasts get <id>` | `GET /broadcasts`, `GET /broadcasts/{id}` |
| `/templates` | `resend templates list` | `GET /templates` |
| `/audience` | `resend contacts list`, `resend segments list`, `resend segments contacts <id>` | `GET /contacts`, `GET /segments` |
| `/webhooks` | `resend webhooks list` | `GET /webhooks` |
| `/logs`, `/logs/<id>` | `resend logs list`, `resend logs get <id>` | `GET /logs`, `GET /logs/{id}` |
| `/settings/usage` | `resend usage` | Use the CLI or the MCP `get-usage` tool |

The MCP server has a tool for each of these (`list-emails`, `get-domain`, `list-api-keys`, ...).

Some things are dashboard-only: billing, team members, SSO and the account's own settings. For those, tell the user what to change and give them the link; they make the change themselves.

## Credentials

The only credential an agent uses is a Resend API key (prefix `re_`). If the MCP server, `RESEND_API_KEY` or `resend login` isn't set up yet, ask the user to:

1. Create a key at `https://resend.com/api-keys` with the narrowest permission that fits the task.
2. Put it in `RESEND_API_KEY` in your environment, or run `resend login` themselves.

Never ask them to paste the key into the conversation. See [auth.md](https://resend.com/auth.md) for how to find and handle the key.

## Humans

If you are a person, log in at [resend.com/login](https://resend.com/login).
