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

try {
  const response = await fetch(url, options);
  const data = await response.json();
  console.log(data);
} catch (error) {
  console.error(error);
}
{
  "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