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

# GET /api/dids/lookup

> Resolves a WebAuthn credential ID to its registered on-chain decentralized identifier (DID) so clients can authenticate returning passkey users.

Resolves a WebAuthn credential ID to a registered on-chain DID. Queries the global `SESSION_DB` D1 database directly — does not route to a Durable Object.

## Query parameters

| Parameter      | Type     | Required | Description            |
| -------------- | -------- | -------- | ---------------------- |
| `credentialId` | `string` | Yes      | WebAuthn credential ID |

## Response — found

```json theme={null}
{
  "found": true,
  "identifier": "alice",
  "channel": "handle",
  "did": "did:new:0x...",
  "txHash": "0x...",
  "blockNumber": 12345678,
  "smartAccount": "0x...",
  "createdAt": "2024-01-01T00:00:00Z"
}
```

## Response — not found

```json theme={null}
{ "found": false }
```

## Errors

| Code  | `error`                                   | Condition        |
| ----- | ----------------------------------------- | ---------------- |
| `400` | `"Missing query parameter: credentialId"` | Parameter absent |
