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

# Quickstart

> Get up and running with BKey in 5 minutes.

# Quickstart

## 1. Get Credentials

Sign up at [bkey.id](https://bkey.id) and create an OAuth client from the developer dashboard.

You'll receive:

* `BKEY_CLIENT_ID` — your application's client ID
* `BKEY_CLIENT_SECRET` — your application's client secret

## 2. Install the SDK

<CodeGroup>
  ```bash TypeScript theme={null}
  npm install @bkey/sdk
  ```

  ```bash Python theme={null}
  pip install bkey-sdk
  ```

  ```bash CLI theme={null}
  npm install -g @bkey/cli
  ```
</CodeGroup>

## 3. Authenticate

<CodeGroup>
  ```typescript TypeScript theme={null}
  import { BKeyClient } from '@bkey/sdk';

  const bkey = new BKeyClient({
    clientId: process.env.BKEY_CLIENT_ID!,
    clientSecret: process.env.BKEY_CLIENT_SECRET!,
  });
  ```

  ```python Python theme={null}
  from bkey import BKeyClient

  client = BKeyClient(
      client_id="your-client-id",
      client_secret="your-client-secret",
  )
  ```

  ```bash CLI theme={null}
  bkey auth login
  ```
</CodeGroup>

## 4. Request Biometric Approval (CIBA)

CIBA is BKey's core primitive. Your agent requests approval, the user gets a push notification on their phone, and approves with facial biometrics.

<CodeGroup>
  ```typescript TypeScript theme={null}
  // Request biometric approval for any action
  const result = await bkey.approve('Deploy to production', {
    scope: 'approve:action',
    userDid: 'did:bkey:...',
  });

  if (result.approved) {
    console.log('User approved! Proceeding...');
    // result.accessToken is a short-lived EdDSA JWT proving consent
  }
  ```

  ```python Python theme={null}
  # One call: initiates CIBA, sends push, polls until approved/denied.
  result = client.approve(
      message="Deploy to production",
      user_did="did:bkey:...",
      scope="approve:action",
  )
  # result.access_token is a short-lived EdDSA JWT proving consent.
  ```

  ```bash CLI theme={null}
  bkey approve "Deploy to production" \
    --scope approve:action \
    --user-did did:bkey:...
  ```
</CodeGroup>

## 5. Use Cases Built on CIBA

Once you have biometric approval, you can build on top of it:

**Checkout** — Agent-initiated purchases:

```bash theme={null}
bkey checkout request --merchant "Store" --amount 9.99 --currency USD
```

**Vault** — Access encrypted secrets with biometric gate:

```bash theme={null}
bkey vault store --key API_KEY --value sk-...
bkey vault access --id vault_item_123
```

**Custom actions** — Use the CIBA token as proof of consent in your own app:

```typescript theme={null}
if (result.approved) {
  // The accessToken proves the user said yes
  await myApp.deleteResource(resourceId);
}
```

## Next Steps

* [Agent Payments](/docs/guides/x402-payments) — let your agent pay for APIs (auto-detects x402 vs MPP)
* [CIBA Deep Dive](/docs/authentication/ciba) — understand the core approval flow
* [Encryption](/docs/guides/encryption) — what protects each step, end-to-end
* [MCP Integration](/docs/guides/mcp-integration) — gate MCP tool calls with biometric approval
* [Authentication Overview](/docs/authentication/overview) — all OAuth flows
* [API Reference](/docs/api-reference/overview) — full endpoint documentation
