logo
OpenapiAuth

Verify a SIWE signature

API Docs with browser client
POST
/siwe/verify

Verify a signed SIWE message, consume its nonce, and return a session token plus stored session details.

Authorization

headerx-api-key<token>

Request Body

application/json
  1. body

Input required to verify a signed SIWE message and create a session.

signature*string

Hex-encoded signature produced for the SIWE message.

Match^0x[a-fA-F0-9]+$
message*

EIP-4361 Sign-In with Ethereum message payload.

address*string

Expected signer wallet address used to cross-check the SIWE message.

Response Body

OK

application/json
  1. response

Successful SIWE signature verification response.

valid*unknown

Indicates the SIWE signature was verified.

recoveredAddress?unknown

Recovered signer address after successful verification.

token*string

Opaque SIWE session token to send on authenticated requests.

Formatuuid
session*

Stored SIWE session details returned with the session token.

Example Request
curl -X POST 'https://example.com/v4/siwe/verify' \  -H 'Content-Type: application/json' \  -d '{  "signature": "string",  "message": {    "address": "string",    "chainId": -9007199254740991,    "domain": "string",    "nonce": "string",    "uri": "http://example.com",    "version": "1"  },  "address": "string"}'
Example Response
{  "valid": true,  "recoveredAddress": null,  "token": "b5507016-7da2-4777-a161-1e8042a6a377",  "session": {    "address": null,    "delegatorAddress": null,    "chainId": -9007199254740991,    "createdAt": "2019-08-24T14:15:22Z",    "maxAgeSeconds": -9007199254740991  }}