> ## 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

```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
```

## 3. Authenticate

```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
```

## 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.

```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:...
```

## 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](https://bkey.id/docs/guides/x402-payments.md) — let your agent pay for APIs (auto-detects x402 vs MPP)
* [CIBA Deep Dive](https://bkey.id/docs/authentication/ciba.md) — understand the core approval flow
* [Encryption](https://bkey.id/docs/guides/encryption.md) — what protects each step, end-to-end
* [MCP Integration](https://bkey.id/docs/guides/mcp-integration.md) — gate MCP tool calls with biometric approval
* [Authentication Overview](https://bkey.id/docs/authentication/overview.md) — all OAuth flows
* [API Reference](https://bkey.id/docs/api-reference/overview.md) — full endpoint documentation


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