Skip to main content
POST
/
v1
/
auth
/
submit-signature
Submit Signature
curl --request POST \
  --url https://swap-api.flux.fun/v1/auth/submit-signature \
  --header 'Content-Type: application/json' \
  --header 'x-api-key: <api-key>' \
  --data '
{
  "signature": "0x...",
  "extraData": "{\"walletAddress\":\"0x...\",\"expiresOn\":\"2024-12-31T23:59:59Z\",\"hmac\":\"...\",\"chainId\":8453,\"isSmartContractWallet\":false}"
}
'
{
  "success": true,
  "accessToken": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9..."
}

Authorizations

x-api-key
string
header
required

Body

application/json
signature
string
required

The signature of the challenge message, signed with your wallet's private key

Example:

"0x..."

extraData
string
required

The extraData string received from the Get Message endpoint

Example:

"{\"walletAddress\":\"0x...\",\"expiresOn\":\"2024-12-31T23:59:59Z\",\"hmac\":\"...\",\"chainId\":8453,\"isSmartContractWallet\":false}"

Response

Authentication successful

success
boolean
required
Example:

true

accessToken
string
required

JWT access token for authenticated requests. Include this in the Authorization header (Bearer token). Expires after 2 hours.

Example:

"eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9..."