đŸ› ī¸
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
  • Install Okapi
  • Initialize Okapi
  1. JS SDK

Install Okapi

Here is a guide on how to install @okapihq/sdk

Install Okapi

The easiest way to integrate the Okapi SDK into your JavaScript project is through the npm module.

Install the package via npm:

npm install @okapihq/sdk

or yarn:

yarn add @okapihq/sdk

Import Okapi:

import { okApiClient } from '@okapihq/sdk';

Initialize Okapi

After your dependency is added, you simply need to initialize okapi via the start method:

okApiClient.start('YOUR_API_KEY');

âš ī¸ Warning: Make sure to keep your api key private.

To know how to get your API key, check the Get an API key section.

PreviousJS SDKNextWallet

Last updated 2 years ago

đŸ’ģ
đŸ“Ļ