đŸ› ī¸
Okapi docs
  • 👋Welcome to Okapi
  • 🧰Our products
  • Fundamentals
    • đŸ› ī¸Quickstart
      • đŸ–ŧī¸Mint new NFT
      • đŸĒ™Mint new tokens
      • 🔑Get API key
      • đŸŽ¯Create an Objective
      • 🎁Create a Reward
      • 🔐Create a token gate
      • đŸ—„ī¸Update your organization profile
      • 🔁Manage subscriptions
      • đŸ”ĸCompute units
      • đŸ’ŗPricing
      • đŸ•šī¸Demo
  • đŸ’ģJS SDK
    • đŸ“ĻInstall Okapi
    • 👀Wallet
    • đŸŽ¯Objective
    • 🎁Reward
    • 🔐Token gating
  • Use case
    • 💡Use case
      • 🎮Gaming
      • 🍔Restaurants
      • đŸ›ī¸Retailers
      • âœˆī¸Travel
      • 🏨Hospitality
      • đŸĻFinancial services
Powered by GitBook
On this page
  1. JS SDK

Wallet

Get user wallet endpoint

This endpoint retrieve a user wallet. We recommend you to use email as the user value but you can use any string you like (for instance a user ID).

Note: The user needs to be unique in your app (ex: email, UID)

const data = await okApiClient.wallet({ user: "john@doe.com" })
{
    "publicKey": "CDEYBvm3YurphnsRNzih2w2iqRPfFsfWiWKUiRJX9ijw",
    "tokens": [
        {
            "name": "OKAPI coin",
            "description": "OKAPI official coin.",
            "symbol": "OKAPI",
            "mint": "E8urN1zTB7iuHAarzudZYjh8cXYKHYjTkZunnm83e54t",
            "amount": 700,
            "image": "https://arweave.net/1iurAcQchFNADmInuP-kmISxVWg_YNGLc0RnYtkAEVI"
        }
    ],
    "nfts": [
        {
            "name": "Okapi NFTs",
            "description": "Okapi official NFTs.",
            "symbol": "OKNFT",
            "mint": "82Y3wbZDUFHws5EJUUoprvGT97KKexCxhghpYyy8FqU2",
            "amount": 3,
            "image": "https://arweave.net/52kvtqhMaMrfOqM1GHhtvLaHjcFAA4kz4AqTfqjj4QM"
        }
    ]
}
{
    "message": "Unauthorized"
}

Cost: 2 compute units

PreviousInstall OkapiNextObjective

Last updated 2 years ago

đŸ’ģ
👀