# dev.cocore.account.listApiKeys

> Published by [cocore.dev](https://lexicon.garden/identity/did:plc:5quuhkmwe2q4k3azfsgg7kdz)

✓ This is the authoritative definition for this NSID.

## Links

- [View on Lexicon Garden](https://lexicon.garden/lexicon/did:plc:5quuhkmwe2q4k3azfsgg7kdz/dev.cocore.account.listApiKeys)
- [Documentation](https://lexicon.garden/lexicon/did:plc:5quuhkmwe2q4k3azfsgg7kdz/dev.cocore.account.listApiKeys/docs)
- [Examples](https://lexicon.garden/lexicon/did:plc:5quuhkmwe2q4k3azfsgg7kdz/dev.cocore.account.listApiKeys/examples)

## Definitions

### `dev.cocore.account.listApiKeys`

**Type**: `query`

List every API key belonging to the authenticated account, most-recently-created first. The owning DID is derived from the credential presented (session cookie or `Authorization: Bearer cocore-...`); there is no way to list another account's keys. Secrets are never returned — see `apiKeyView`.

#### Output

**Encoding**: `application/json`

| Property | Type | Required | Description |
|----------|------|----------|-------------|
| `keys` | `array` | Yes |  |

#### Errors

- **AuthRequired**: No valid session cookie or bearer key was presented.

## Raw Schema

```json
{
  "id": "dev.cocore.account.listApiKeys",
  "defs": {
    "main": {
      "type": "query",
      "errors": [
        {
          "name": "AuthRequired",
          "description": "No valid session cookie or bearer key was presented."
        }
      ],
      "output": {
        "schema": {
          "type": "object",
          "required": [
            "keys"
          ],
          "properties": {
            "keys": {
              "type": "array",
              "items": {
                "ref": "dev.cocore.account.defs#apiKeyView",
                "type": "ref"
              }
            }
          }
        },
        "encoding": "application/json"
      },
      "description": "List every API key belonging to the authenticated account, most-recently-created first. The owning DID is derived from the credential presented (session cookie or `Authorization: Bearer cocore-...`); there is no way to list another account's keys. Secrets are never returned — see `apiKeyView`."
    }
  },
  "$type": "com.atproto.lexicon.schema",
  "lexicon": 1
}
```
