Skip to main content
POST
/
api
/
auth
/
challenge
curl -X POST https://oro-tradebook-devnet.up.railway.app/api/auth/challenge \
  -H "Content-Type: application/json" \
  -d '{
    "walletAddress": "YourSolanaWalletAddress",
    "keyType": "PARTNER",
    "partnerId": "1"
  }'
{
  "success": true,
  "data": {
    "challengeId": "abc123-def456",
    "message": "Sign this message to generate an API key for Oro Gold TradeBook: abc123-def456",
    "expiresAt": "2024-01-15T10:30:00.000Z"
  }
}

Overview

This is the first step in the two-step API key creation process. Submit your wallet address and key type to receive a challenge message that must be signed.

Request Body

walletAddress
string
required
The Solana wallet address requesting the API key
keyType
string
required
Type of API key to create. Options: ADMIN or PARTNER
partnerId
string
Required for PARTNER key type. The partner ID to associate with the key.

Response

success
boolean
Whether the request was successful
data
object
curl -X POST https://oro-tradebook-devnet.up.railway.app/api/auth/challenge \
  -H "Content-Type: application/json" \
  -d '{
    "walletAddress": "YourSolanaWalletAddress",
    "keyType": "PARTNER",
    "partnerId": "1"
  }'
{
  "success": true,
  "data": {
    "challengeId": "abc123-def456",
    "message": "Sign this message to generate an API key for Oro Gold TradeBook: abc123-def456",
    "expiresAt": "2024-01-15T10:30:00.000Z"
  }
}