Niftory Docs
  • What is Niftory?
  • Get your API Keys
  • 👩‍💻API
    • Niftory Web3 API
    • SDK QuickStart
      • Using the SDK in React
      • Using the SDK from the Server
    • API Quickstart
      • Create your first Wallet
      • API calls with Sample Content
      • Mint your first NFT
    • API Cheat Sheet
    • Niftory Sample App
      • Explore the Sample App
      • Anatomy of a Niftory App
        • Getting Authenticated
        • GraphQL Client Setup
        • API Usage
        • Transfer an NFT
    • 💡Core Concepts
      • Niftory Data Model
      • Authentication
        • Using Your API Key
        • Configuring Your App
        • Privileged Authentication
      • App and AppUser
      • NFTs
        • Creating NFTs
        • Querying NFTs
        • Transferring NFTs
        • Minting NFTs
      • Wallets
        • Create a Niftory Wallet
        • Register External Wallets
        • Query Wallets
      • Contract
      • User Auth (Client-Side)
    • Your Niftory Account
  • 🧑‍💼Admin Portal
    • Niftory Admin Portal
    • 🚀Guides
      • Setting Up Your Org
      • Create Your First NFT
    • 🗺️Explore
      • Org and Apps
      • NFT Collection
        • Sets
        • Collectibles
        • NFTs
    • 💼Use Cases
      • For Engineers
      • For Designers
      • For Business Users
  • 📖Reference
    • GraphQL & Auth Endpoints
    • API Reference
    • SDK API Reference
Powered by GitBook
On this page

Was this helpful?

  1. API
  2. SDK QuickStart

Using the SDK from the Server

PreviousUsing the SDK in ReactNextAPI Quickstart

Last updated 1 year ago

Was this helpful?

First, make sure you've installed the Niftory SDK on your project with:

yarn add @niftory/sdk

Now use the SDK in your codebase as follows:


import { NiftoryClient } from "@niftory/sdk"


...

const client =
    new NiftoryClient({
      environmentName: process.env.ENVIRONMENT //testnet or mainnet,
      appId: process.env.CLIENT_ID,
      apiKey: process.env.API_KEY,
      clientSecret: process.env.CLIENT_SECRET,
    })

await client.createNiftoryWallet()

Note: This will create a Niftory SDK with using a client secret that should never be public.

Parameters

Parameter
Description
Example Value

environmentName

Environment of the blockchain the app will run on.

testnet or mainnet

appId

clfjx6jzq200gs915aiz7884q

apiKey

Xk0A3H/LjA1G1D99RU1L2zoS11vR1ZJs2m6Ncqu0tdA=

clientSecret

40b27a45dtt6fce9b6e664613c43250aea67912wbfbcba263f1b57dce2c7b9ed6045f1d72dd3ca2f000070bc7a6af795c4c0c6fee70l0f3d2f290102b308aaba

For examples of server-side usage you can check out our sample apps using the Niftory SDK:

App Id or Client id generated from the

API key generated from the

Client Secret generated from the

All the available methods on the NiftoryClient are documented on the .

👩‍💻
privileged authentication
API Reference
https://github.com/Niftory/niftory-samples
Niftory admin app
Niftory admin app
Niftory admin app