Sign in with Ethereum (SIWE)
Endpoints
Endpoint
Method
Auth
Purpose
Flow
agent client-api
│ │
│ GET /v1/session/wallet/nonce?address=0x.. │
├─────────────────────────────────────────────▶│
│ │ stores nonce in Redis
│ { "nonce": "abc..." } │ under key siwe:nonce:0x...
│◀─────────────────────────────────────────────┤
│ │
│ build SIWE message with the nonce │
│ personal_sign(message) │
│ │
│ POST /v1/session/wallet/verify │
│ { message, signature } │
├─────────────────────────────────────────────▶│
│ │ parses message → recovers signer
│ │ compares to nonce-bound address
│ │ consumes nonce (one-shot)
│ │ creates user if first-time
│ { token, expiresAt, user } │ issues JWT (also as httpOnly cookie)
│◀─────────────────────────────────────────────┤Required SIWE message format
End-to-end example (viem)
Using the JWT
Refresh
Errors
Status
Body
Cause
Notes for production
Last updated