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

apiKeyAuth
x-api-key<token>

In: header

Request Body

application/json

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

application/json

application/json

application/json

application/json

application/json

application/json

application/json

application/json

application/json

application/json

application/json

curl -X POST "https://api.namefi.dev/v-next/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"  }'
{
  "valid": true,
  "recoveredAddress": null,
  "token": "b5507016-7da2-4777-a161-1e8042a6a377",
  "session": {
    "address": null,
    "chainId": -9007199254740991,
    "createdAt": "2019-08-24T14:15:22Z",
    "maxAgeSeconds": -9007199254740991
  }
}
{
  "defined": true,
  "code": "BAD_REQUEST",
  "status": 400,
  "message": "Bad Request",
  "data": null
}
{
  "defined": true,
  "code": "UNAUTHORIZED",
  "status": 401,
  "message": "Unauthorized",
  "data": null
}
{
  "defined": true,
  "code": "FORBIDDEN",
  "status": 403,
  "message": "Forbidden",
  "data": null
}
{
  "defined": true,
  "code": "NOT_FOUND",
  "status": 404,
  "message": "Not Found",
  "data": null
}
{
  "defined": true,
  "code": "NOT_ACCEPTABLE",
  "status": 406,
  "message": "Not Acceptable",
  "data": null
}
{
  "defined": true,
  "code": "TIMEOUT",
  "status": 408,
  "message": "Request Timeout",
  "data": null
}
{
  "defined": true,
  "code": "CONFLICT",
  "status": 409,
  "message": "Conflict",
  "data": null
}
{
  "defined": true,
  "code": "PRECONDITION_FAILED",
  "status": 412,
  "message": "Precondition Failed",
  "data": null
}
{
  "defined": true,
  "code": "TOO_MANY_REQUESTS",
  "status": 429,
  "message": "Too Many Requests",
  "data": null
}
{
  "defined": true,
  "code": "INTERNAL_SERVER_ERROR",
  "status": 500,
  "message": "Internal Server Error",
  "data": null
}