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

# Get Passkey Account

> Retrieve passkey account details including relying party ID, public key, and session key status.

Retrieves detailed information about a passkey account including its relying party ID, public key, and current session key if not expired.

## Path Parameters

* **passkey\_account\_address** (required): The on-chain Solana address of the passkey account

## Response

Returns passkey account details:

```json theme={null}
{
  "relying_party_id": "example.com",
  "pubkey": "9yM...def", // Passkey public key in base58
  "session_key": {
    // Optional: Only if session is still valid
    "key": "3pQ...ghi",
    "expiration": 1234567890 // Unix timestamp
  }
}
```

## Session Key Validation

The endpoint performs session key expiration validation:

1. **Checks Blockchain Clock**: Queries Solana for current slot/timestamp
2. **Validates Expiration**: Compares session expiration against blockchain time
3. **Returns if Valid**: Includes session\_key in response if not expired
4. **Omits if Expired**: session\_key field not included if expired

<Note>
  Session validation is performed against the **Solana blockchain clock**, not
  the API server time. This ensures consistent validation across all Grid
  services.
</Note>

## Use Cases

### Check Session Status

Determine if an existing session key is still valid:

```javascript theme={null}
const response = await fetch(
  `https://grid.squads.xyz/api/grid/v1/passkeys/account/${passkeyAddress}`,
  {
    headers: {
      Authorization: "Bearer YOUR_API_KEY",
      "x-grid-environment": "sandbox",
    },
  }
);

const data = await response.json();

if (data.session_key) {
  console.log("Session is valid until:", new Date(data.session_key.expiration * 1000));
  // Use existing session
} else {
  console.log("Session expired, need to re-authenticate");
  // Call /passkeys/auth to refresh
}
```

### Verify Passkey Existence

Check if a passkey account exists before operations:

```javascript theme={null}
try {
  const response = await fetch(
    `https://grid.squads.xyz/api/grid/v1/passkeys/account/${passkeyAddress}`,
    {
      headers: {
        Authorization: "Bearer YOUR_API_KEY",
        "x-grid-environment": "sandbox",
      },
    }
  );

  if (response.ok) {
    console.log("Passkey exists");
  }
} catch (error) {
  console.error("Passkey not found");
}
```

### Get Relying Party Information

Retrieve the relying party ID for cross-origin validation:

```javascript theme={null}
const data = await response.json();
console.log("Relying Party:", data.relying_party_id);
// Use for WebAuthn RP configuration
```

## Response Fields

### relying\_party\_id

The WebAuthn relying party identifier associated with this passkey. Limited to 32 bytes. Used for validating WebAuthn operations.

### pubkey

The passkey's public key in base58 format. This is the cryptographic public key used to verify signatures from this passkey.

### session\_key (optional)

Only included if a session key exists and has not expired:

* **key**: Session public key in base58 format
* **expiration**: Unix timestamp when session expires

## Important Notes

* **Blockchain Validation**: Session expiration checked against Solana clock
* **Expired Sessions**: session\_key omitted if expired (not an error)
* **Passkey Persistence**: Passkey data persists even after session expiration
* **RP ID Limit**: Relying party IDs are limited to 32 bytes
* **Cross-Origin**: Relying party ID must match WebAuthn origin

## Error Handling

Common errors:

* **NoValidExternallySignedAccount**: Passkey address not found
* **InvalidExternallySignedAccountAddress**: Malformed address
* **NotFound**: Passkey account does not exist

## Related Endpoints

* [Authorize Passkey Session](/grid/v1/api-reference/endpoint/passkeys/auth) - Refresh expired session
* [Find Passkey Account](/grid/v1/api-reference/endpoint/passkeys/find) - Lookup by authenticator
* [Get Passkey Session](/grid/v1/api-reference/endpoint/passkeys/get-session) - Get session URL


## OpenAPI

````yaml GET /api/grid/v1/passkeys/account/{passkey_account_address}
openapi: 3.1.0
info:
  title: Grid v1 API
  description: Grid v1 REST API for Solana-based smart account system
  contact:
    name: Grid API Support
    url: https://squads.so
    email: support@squads.so
  license:
    name: MIT
  version: 1.0.0
servers:
  - url: https://grid.squads.xyz
    description: Production server
security:
  - bearer_auth: []
tags:
  - name: accounts
    description: Smart account management operations
  - name: spending-limits
    description: Spending limit management
  - name: standing-orders
    description: Standing order operations
  - name: transactions
    description: Transaction management
  - name: trade
    description: Trade operations and management
  - name: payments
    description: Payment intent operations
  - name: passkeys
    description: Passkey management
  - name: kyc
    description: Know Your Customer operations
  - name: external-accounts
    description: External bank account management
  - name: virtual-accounts
    description: Virtual account management
  - name: auth
    description: Authentication operations
  - name: proposals
    description: Proposal management for multi-sig operations
  - name: compliance
    description: Compliance entity management and KYB/KYC operations
paths:
  /api/grid/v1/passkeys/account/{passkey_account_address}:
    get:
      tags:
        - passkeys
      summary: Get passkey account
      description: >-
        Retrieve passkey account details by address. Returns the relying party
        ID, public key, and optional session key if not expired.
      operationId: handler
      parameters:
        - name: passkey_account_address
          in: path
          description: Passkey account address (Solana public key)
          required: true
          schema:
            type: string
        - name: x-grid-environment
          in: header
          description: Solana network environment (sandbox, devnet, mainnet)
          required: true
          schema:
            type: string
          example: sandbox
      responses:
        '200':
          description: Passkey account retrieved successfully
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/GetPasskeyAccountResponsePayload'
        '400':
          description: Invalid passkey account address
        '404':
          description: Passkey account not found
        '500':
          description: Internal server error
      security:
        - bearer_auth: []
components:
  schemas:
    GetPasskeyAccountResponsePayload:
      type: object
      required:
        - relyingPartyId
        - pubkey
      properties:
        pubkey:
          type: string
        relyingPartyId:
          type: string
        sessionKey:
          oneOf:
            - type: 'null'
            - $ref: '#/components/schemas/SessionKey'
    SessionKey:
      type: object
      description: >-
        Grid v1 API SessionKey type that supports backward-compatible
        deserialization

        from both raw bytes array (old format) and base58 string (new format).

        Always serializes to base58 string format.
      required:
        - key
        - expiration
      properties:
        expiration:
          type: integer
          format: int64
          minimum: 0
        key:
          type: string
          example: '11111111111111111111111111111111'
  securitySchemes:
    bearer_auth:
      type: http
      scheme: bearer
      description: Your Grid API key from the Grid Dashboard

````