App and AppUser

If your app handles user authentication already, you can skip the AppUser data model, and use Niftory directly with wallets. All APIs work with both a wallet address/ID and a user ID. The main difference is if you are bypassing AppUser, then all APIs must be called with Privileged Authentication (i.e. by passing in both your API Key and Client Secret).

Check out Anatomy of a Niftory App to see how these constructs are used in practice.

Represents your application in the Niftory ecosystem.

app

query AppQuery {
  app { 
    id 
  }
}
Sample Response
{
  "data": {
    "app": {
      "id": 56
    }
  }
}

Representation of a user logged in to your application via Niftory's authentication service.

appUser

query AppUserQuery {
  appUser {
    email
    image
    name
    id
    wallet {
      ...WalletFragment
    }
    app {
      ...AppFragment
    }
  }
}
Sample Response
{
  "data": {
    "appUser": {
      "email": "user@test.com",
      "image": "linkToImage",
      "name": "Nif Tory",
      "id": 3,
      "wallet": Wallet,
      "app": App
    }
  }
}

Last updated