Server-side: Does user have access to item

Server-side integration: Considerations and workflow for validating asset ownership

This workflow covers the two different ways in which you can check what assets a user has access to.

The two methods here are:

  1. You know the Nefta User ID (NUID), and are not bothered about authenticating the user.
  2. You want to authenticate the player first, and then check the assets of that user's token.

Option 1: Call Nefta User ID for assets

This is the simpler option:

Basically, you call Get digital assets owned by user with your API key and the User ID.

You will then receive all assets with their asset ID (the ID assigned to all of that type of asset), and the Ownership ID for each specific asset (Nefta's unique serial for an asset).


Option 2: POST User ID for token to authenticate, then GET assets that token has access to

This option involves:

  1. POST Sign in gamer with the User ID to get the token to authenticate the user,
  2. GET Get Gamer Owned Assets (client side) with the token from the previous step to authenticate, to get the assets the token has access to.


Next step: Check and perform the function

Now you've checked if the user has access to something, you need to:

  1. Validate was one of the returned values in the array a match for what you were looking for,
  2. If yes, you then need to perform the functions or logic on your side.