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

# Sign up for the app from an agent

> How an agent starts a West Kite app account or MCP connection for a person over HTTP, hands them a link and code, and gets a token once they approve. For an API key, see the agent quickstart.

> **Want an API key instead?** This page covers the West Kite app and its MCP server. To get a developer API key from an agent, with no password, follow the [agent quickstart](/docs/api/agent-quickstart.md).

An agent can start a West Kite account for a person, or connect to the account they already have. The account belongs to the person: the agent starts it, and the person finishes it in about a minute.

The person always chooses their own password, agrees to the terms and approves the connection. There's no anonymous access.

## Which way in

* **The client supports MCP OAuth** (Claude Code, Codex, Cursor and others): [add the server](/docs/connect.md) and let it open the browser.
* **The agent drives a browser:** open `https://app.westkite.com/sign-up#login_hint=<email>&first_name=<name>&last_name=<name>` to fill in the form for them.
* **The agent can only make HTTP requests**, or runs somewhere with no callback: follow the steps below.

**1. Start the connection**

```bash theme={null}
curl https://app.westkite.com/agent/identity \
  -H 'Content-Type: application/json' \
  --data '{"type":"service_auth","login_hint":"pat@example.com","first_name":"Pat","last_name":"Lee","client_name":"Property research agent"}'
```

Ask the person before sending their email. `login_hint` and the names are optional, but with `login_hint` only that person's account can finish, sign-up is filled in for them, and they won't need a code from you.

The response has a `claim_token`, which you keep to yourself, and a `claim` with a `verification_uri`, a `user_code` and a polling `interval`.

**2. Hand it to the person**

If you sent their email, send just the link:

> Open this link to connect me to West Kite: sign up or sign in, then select Allow.
>
> [https://app.westkite.com/agent/claim?attempt=…](https://app.westkite.com/agent/claim?attempt=…)

Without `login_hint`, the page also asks for the `user_code`, so add "and enter this code: **123456**". Use the `verification_uri` exactly as returned. Codes go in that page, not back to you.

**3. Wait for approval**

```bash theme={null}
curl https://app.westkite.com/oauth/token \
  --data-urlencode 'grant_type=urn:ietf:params:oauth:grant-type:device_code' \
  --data-urlencode 'device_code=<claim_token>'
```

Repeat every `interval` seconds. You'll get `authorization_pending` until they finish. `slow_down` means wait longer, `access_denied` means they declined, and `expired_token` means the 10 minutes ran out, so start again.

Once they approve, you get an `access_token` and a `refresh_token`. Store both somewhere private.

**4. Use West Kite**

Connect to `https://app.westkite.com/mcp` over Streamable HTTP with `Authorization: Bearer <access_token>`, then [look up a property](/docs/property-lookup.md).

When the token expires, refresh it at the same token endpoint with `grant_type=refresh_token`. Refresh tokens rotate, so keep the new one.

The full contract, including every error, is in [auth.md](https://app.westkite.com/auth.md).


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