---
title: "Get SIWE message"
method: POST
path: "/auth/siwe/challenge"
tags: ["Auth"]
---

# Get SIWE message

`POST /auth/siwe/challenge`

## Request

- Base URL: `https://console-api.blockvectra.com/v1`
- URL: `https://console-api.blockvectra.com/v1/auth/siwe/challenge`
- Auth: one of:
  - none
  - HTTP bearer

Generate an EIP-4361 message and single-use nonce valid for 5 minutes. Programmatic clients omit Origin; browsers send their console Origin. Sign the returned message verbatim with an Ethereum mainnet EOA using EIP-191 personal_sign. Contract wallets and smart accounts are unsupported. purpose=login requires no session; purpose=link requires the current session.

## Request body

- SiweChallengeRequest
  - `address` string, required: EOA address. Must be a valid EIP-55 checksum if mixed case.
  - `purpose` 'login' | 'link', required: `login` for login / sign-up; `link` to link wallet to current session user (requires session).

## Response `200`

Message and nonce.

- SiweChallengeResponse
  - `nonce` string, required
  - `message` string, required: EIP-4361 message (LF line endings, no trailing newline), up to 2048 bytes.
  - `expires_at` string, date-time, required: RFC 3339 UTC, second precision, ending in `Z` (`2026-09-26T08:00:00Z`); no fractional seconds, without `+00:00` timezone offsets.

## Other responses

- `400`: Invalid `address` or `purpose` (including invalid EIP-55 checksum), present but unconfigured `Origin` header (including empty, `null`; omitting `Origin` is programmatic mode, not an error), unknown fields.
- `401`: Missing or invalid session (without distinguishing cause).
- `405`: Path exists but HTTP method does not match.
- `413`: Request body exceeds 64 KiB limit. Exceeding this limit returns 413 (`payload_too_large`).
- `429`: Rate limit exceeded.
- `500`: Internal server error.

---

[API](https://skmtc.dev/blockvectra/apis/blockvectra-console-api.md) · [All operations](https://skmtc.dev/blockvectra/apis/blockvectra-console-api/llms.txt) · [OpenAPI document](https://skmtc.dev/blockvectra/apis/blockvectra-console-api/revisions/28c91298f433?raw)
