Quick Exchange
  • Quick Exchange for Partners
  • Expired Quote Handling
  • Widget Integration
    • Embedded Widget
    • Configuration
      • Config Version
      • Settlement Defaults
      • Settlement Parameters
      • Custom Styles
      • Identity
      • Special Layout
      • Partner Fields
    • Event Hooks
  • API Integration
    • Authentication
    • User Session
      • OAuth
      • KYC
    • Settlements
  • Settlements
    • Funding Methods
      • BLOCKCHAIN_TRANSFER
      • BLOCKCHAIN_DELEGATED_BROADCAST
      • CARD_PAYMENT
        • Test Cards
    • Payout Methods
      • BLOCKCHAIN_TRANSFER
      • LIQUID_PARTNER_WALLET
      • LIQUID_WALLET
      • LIQUID_USER_WALLET
  • E-Commerce
    • X-Quoine-Auth
    • Intents (Fixed Settlements)
      • Deliverable Currency
    • Transactions
      • Transaction Status
Powered by GitBook
On this page

Was this helpful?

  1. API Integration

Authentication

Authenticating API requests

The API is designed around secure sessions. Once a session is created a JWT should be signed on the client side and provided in an Authorization header.

  const { session_id, session_secret } = sessionResponse.data.payload;
  
  const path = `/api/v1/session/${session_id}/accounts`;
  const bearer = jwt.encode({
    path: path,
    session_id: session_id,
    nonce: Date.now()
  }, session_secret)

  const accountsResponse = await axios.get(`https://partners.liquid.com${path}`,
  {
    headers: {
      authorization: `Bearer ${bearer}`
    }
  })
PreviousEvent HooksNextUser Session

Last updated 4 years ago

Was this helpful?