Get wallet public key

Returns the persisted public key for an exact active walletId. walletId is required (400 without it); an API key with selected wallets gets 404 for a wallet it does not list.

GET/v1/wallets/public-keyRun in dashboard

Resolution is DB-backed only.

Requires an API key with the wallets.read action.

Query parameters

  • walletId · string · required · min length 1 · example privy_wallet_123

    Provider wallet ID — the walletId field returned by GET /v1/wallets.

Headers

  • x-project-id · string · min length 1 · example prj_example

    Required for dashboard sessions. API keys use their assigned project.

Responses

  • 200 Wallet public key

    • publicKey · string · required · min length 32 · max length 44 · example So11111111111111111111111111111111111111112

      Base58-encoded Solana address.

  • 400 Bad Request

    • error · object · required

      Standard error payload.

      • code · string · required

        Machine-readable error code.

      • message · string · required

        Human-readable error message.

      • details · object

        Optional error details for debugging.

        • * · any
    • meta · object

      • requestId · string · min length 1 · example req_example

        Request identifier for tracing.

  • 401 Unauthorized

    Same fields as 400.

  • 403 Forbidden. Requires the wallets.read action: an API key must hold it (a module's manage or execute also covers its read), and a signed-in member's organization role must include it. Without it the error is INSUFFICIENT_PERMISSIONS and error.details.action names the action. Any other 403 names its own reason.

    Same fields as 400.

  • 404 Not Found

    Same fields as 400.

  • 409 Conflict

    Same fields as 400.

  • 500 Internal Server Error

    Same fields as 400.

Example request

curl 'https://api.solana.com/v1/wallets/public-key?walletId=privy_wallet_123' \
  -H "Authorization: Bearer $SDP_API_KEY"

Example responses

{
  "publicKey": "So11111111111111111111111111111111111111112"
}

Error responses use the standard error shape.

Is this page helpful?