Skip to main content
POST
/
api
/
v1
/
auth
/
challenge
Verify SIWE signature
const options = {
  method: 'POST',
  headers: {'Content-Type': 'application/json'},
  body: JSON.stringify({message: '<string>', signature: '<string>', ttlInSeconds: 3600})
};

fetch('https://api.valox.co/api/v1/auth/challenge', options)
  .then(res => res.json())
  .then(res => console.log(res))
  .catch(err => console.error(err));
{
  "token": "<string>"
}

Body

application/json
message
string
required

SIWE message containing the nonce

signature
string
required

EOA signature or EIP-1271 contract signature

ttlInSeconds
number
default:3600

Represents the duration of the token in seconds. If not provided, defaults to 1 hour. Maximum 24 hours.

Required range: 60 <= x <= 86400

Response

Signature verified successfully

token
string

JWT token for API authentication