v1

latestOpenAPI 3.1.02026-07-13570316.1 KB
Authentication

Complete Auth

Complete the authentication flow and receive your wallet credentials. After initiating authentication, use this endpoint to submit the required verification data.

Completion Methods:

  • SMS/Email - Submit the verification code you received
  • Passkey - Provide the WebAuthn signature response
  • SIWE - Submit your signed Ethereum message
  • Guest - Create an ephemeral guest wallet
  • Custom (JWT, auth-payload) - Send your JWT token or custom payload

Response:

  • isNewUser - Whether this is a new wallet creation
  • token - JWT token for authenticated API requests
  • type - The authentication method used
  • userId - Unique identifier for the authenticated user
  • walletAddress - Your new or existing wallet address

Next step - Verify your token:

// Verify the token and get complete wallet details (server-side)
fetch('/v1/wallets/me', {
  headers: { 
    'Authorization': 'Bearer ' + token,
    'x-secret-key': 'your-secret-key'
  }
})
.then(response => response.json())
.then(data => {
  console.log('Wallet verified:', data.result.address);
  console.log('Auth profiles:', data.result.profiles);
});

Authentication: Requires x-client-id header for frontend usage or x-secret-key for backend usage.

post/v1/auth/complete

Request body

OR
OR
OR
OR
OR

Response

Authentication completed successfully. You now have wallet access.

isNewUserboolean required

Whether this is a newly created user/wallet

tokenstring required

JWT authentication token for API access

typestring required

Type of authentication completed

userIdstring required

Unique identifier for the authenticated user

walletAddressstring required

The wallet address

Example response

{
  "isNewUser": true,
  "token": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9...",
  "type": "email",
  "userId": "user_123",
  "walletAddress": "0x742d35Cc6634C0532925a3b8D43C67B8c8B3E9C6"
}