# bap_getId

Retrieves a Bitcoin Attestation Protocol (BAP) identity profile using an idKey (Paymail or public key). If no idKey is provided, it attempts to use the server's configured identity key.

## Result

A BAP identity record as JSON text, or a not-found message. Supply idKey when no identity is configured.

## Permissions

No spending approval is requested by this handler. Public network lookups can still fail or require a compatible service.

## Definition 1 (full)

Registered in: Before wallet setup; Legacy local wallet; Legacy local identity; Local Vault · broadcasting disabled; Local Vault · all roles; Local Vault · payment role only; Project · payments scope; External BRC-100 wallet; Local Vault + sponsor; Droplit wallet.

Retrieves a Bitcoin Attestation Protocol (BAP) identity profile using an idKey (Paymail or public key). If no idKey is provided, it attempts to use the server's configured identity key.

| Field | Type | Required | Description | Constraints |
| --- | --- | --- | --- | --- |
| idKey | string | No | Optional Identity Key (Paymail or public key). If not provided, attempts to use the server's configured identity key. |  |

Nested requirements apply when their parent is supplied.

### Input schema

```json
{
  "type": "object",
  "properties": {
    "idKey": {
      "description": "Optional Identity Key (Paymail or public key). If not provided, attempts to use the server's configured identity key.",
      "type": "string"
    }
  },
  "$schema": "https://json-schema.org/draft/2020-12/schema"
}
```

[All tools](https://bsvmcp.com/docs/tools)