Skip to main content
POST
/
v1
/
auth
/
get-message
Get Message
curl --request POST \
  --url https://api.example.com/v1/auth/get-message \
  --header 'Content-Type: application/json' \
  --data '
{
  "walletAddress": "<string>"
}
'
{
  "success": true,
  "challenge": {
    "message": "<string>",
    "extraData": "<string>"
  }
}

Overview

Request a challenge message that you’ll sign with your wallet to authenticate. The challenge includes an HMAC that expires after 1 minute, so you should sign and submit it promptly.

Request Body

walletAddress
string
required
Your wallet’s EOA address (e.g., 0x742d35Cc6634C0532925a3b844Bc9e7595f0bEb)

Response

success
boolean
Always true for successful requests
challenge
object
The challenge object containing the message to sign
{
  "success": true,
  "challenge": {
    "message": "Sign into prediction market swaps by MoonPay.\n       \n      WARNING: do not sign this message on any other site.\n    \n      Challenge: a1b2c3d4e5f6...",
    "extraData": "{\"walletAddress\":\"0x742d35Cc6634C0532925a3b844Bc9e7595f0bEb\",\"expiresOn\":\"2024-01-15T10:01:00.000Z\",\"hmac\":\"a1b2c3d4e5f6...\"}"
  }
}