metapro
  • 🤝Welcome!
  • 💻metapro market
    • Set your account
    • Connect wallet + web3 login
    • Side panel
      • Transfer NFT
        • Multiple transfer (Airdrop NFT)
          • Import CSV List
      • Sell NFT
        • Initial NFT Selling (INS)
          • How to setup INS auction
          • How to buy on INS auction
        • Buy Now
          • How to setup Buy Now auction
          • How to buy on Buy Now auction
        • Auction (Bidding)
          • How to setup Auction
          • How to buy on Auction
      • All NFT assets
    • Buy Crypto
    • Top Menu
      • Profile
        • Profile Marketplace
        • My games
        • My assets
          • Royalty
        • Activities
      • Referral Panel
        • Register your downline
        • Downline wallets
        • My referral link
      • Profile Settings
      • Developer Portal
      • Logout
    • Assets
      • Marketplace
        • Auction Card
      • Most favorite
      • Newest assets
        • Asset Card
    • Games
      • Show all games
    • Leaderboard
    • Create asset (minter)
      • Gaming asset specification
      • How to create (mint) asset
        • 1. Setup NFT token
        • 2. Setup metadata
        • 3. Add meta asset
        • 4. Mint meta asset
        • 5. Meta asset created
    • Developers Portal
      • Create team
      • Create game
      • Developers Portal Panel
      • Unity Plugin
      • How to list game on metapro market?
    • Creators
    • Teams
    • Users
    • Wallet App
    • Launcher
    • Market and auction component fees
  • 🚀METAPRO LAUNCHER
    • What is metapro launcher?
    • Download launcher
    • Set your account
      • Login to launcher
    • Home
    • Games
      • Game card on launcher
        • Assets in this game
      • Install game on launcher
      • Update game on launcher
    • My games
      • Installed
      • Not installed
      • Wishlist
    • My assets
      • Collected assets
      • Created assets
      • Wishlist
    • NODEs app
  • 📱metapro one
    • About non-custodial wallet
    • Download & set up
      • Create new metapro wallet
      • Import existing wallet
    • Settings
      • Avatar
      • Multiple wallets
      • Wallet name
      • Private Key
        • Protect Private Key
        • How to find my Private Key
      • Recovery Phrases
        • Protect Recovery Phrases
        • How to find my Recovery Phrases
      • Application version
    • Network switch
    • Deposit (Tokens and Collectibles)
    • Send (Tokens and Collectibles)
      • Send Tokens
      • Send Collectibles (NFT)
    • Buy (Buy and Sell Crypto)
    • Browser
    • My assets
      • Tokens
        • Asset view
        • Adding Tokens
        • Activities
      • Collectibles (NFT)
      • Game assets (NFTma)
    • Explore
      • Apps
      • Collections (NFT)
      • Game assets (NFTma)
    • How to claim Airdrop
    • How to import wallet from MetaMask to metapro
    • Supported devices
  • ⛓️metapro protocol
    • API
      • Users service
      • Teams service
      • Apps service
      • Nft service
      • Nft events service
    • Meta asset
    • Metadata structure
    • Protocole structure
    • Unity Plugin
      • About metapro Unity plugin
      • What's new
      • Guides
        • Installation
        • Requirements
        • Package samples
        • Quick start
          • 1. Editor
            • Access tool
            • Import game key
            • Download resources
            • App data object
            • Change game key
            • Use app data in script
          • 2. Play mode (PC)
            • Enable Web3 in your game
            • Choose provider
            • Connect wallet
            • Login with Web3
            • Display user data
            • Show app tokens
            • Use user and app data from script
          • 3. Play mode (Mobile)
            • Enable Web3 in Your game
            • Choose provider
            • Connect wallet
            • Login with Web3
        • AFP (Additional Features Packages)
          • 1. Safe token transfer
          • 2. Phoenix
        • Troubleshooting
      • Reference
        • MetaproAPPSetup
        • Editor Window
        • Plugin Manager
        • Web3 connection providers
          • metapro
          • Wallet Connect
          • MetaMask
        • WindowController
        • AFP (Additional Features Packages)
          • SafeTransferFrom
          • Phoenix
  • 🛠️WALLET CONNECTOR
    • Introduction
    • Basic informations
      • Next 13 integration
      • React integration
      • Manual installation
  • 👨‍💻Developer Documentation
    • Introduction to Developer Documentation
      • What is a Meta asset?
      • What are the Benefits of Using Tokens as Access Keys for the Game Application
      • Why should I Choose the Meta Assets as the Access Keys for the Game Application?
      • How Does It Work, Exactly?
    • Available Environments
    • Blockchain Communication and information retrieval
      • How can we verify/distinguish a user?
      • How can we track a user's transactions?
      • What information can we obtain?
    • Integration with the Leaderboard service
    • Integration for in-Wallet Apps
    • Integration for Telegram Mini Apps
      • Integration Architecture and Configuration
      • Authorization and Session Management
      • Example Integration and Features
      • Code Examples from the Repository
      • Summary and Appendices
    • Developer documentation for the Construct 3 Plugin
      • Construct 3 - Install plugin
      • Plugin Configuration
      • User onboarding and authorization
      • User Management
      • Score System
      • Leaderboard System
      • Referral System
      • Gameplay
      • Smart Contract Interactions
      • User NFTs
      • Error Handling
      • Additional Getters for Plugin Properties
    • Integration Web3 with Your Game
      • What is Web3
      • Blockchain Basics
      • Differences between chains
      • What is a NFT
      • Advantages of Web3 Gaming
      • Examples of Web3 Games
    • Onboarding the Web3 Player
      • Value for Players
      • Explanation of Cryptocurrency Wallet
      • Rewards for Tournament Participation
      • Reselling Owned Assets
      • Integration of Metapro Wallet Connector
      • Displaying Data for Unlogged Users
      • How to Get Authorization Data
      • User Authorization Benefits
    • Creating Your First Meta Asset
      • The Difference between NFT and Meta Asset
      • Security and Transparency
      • Concept and Value of Meta Assets
      • How and Where to Create Your Meta Asset
        • Step-by-Step Guide on How to Create Your Asset
        • Explanation of URI (Metadata structure)
        • Explanation of the Meta Asset Data taken from our Back End
    • Implementing Meta Assets into Your Game
      • Integrate your Meta Asset to your game using Unity
      • Verify User Tokens Ownership
      • Displaying All User-Owned Tokens
      • Displaying All Assets Assigned to the Game on the Metapro Market
    • Smart Contracts
      • MetaproINS
        • Read Contract
        • Write Contract
      • MetaproBuyNow
        • Read Contract
        • Write Contract
      • MetaproAuction
        • Read Contract
        • Write Contract
      • MetaproMetaAsset
        • Read Contract
        • Write Contract
      • MetaproRoyalty
        • Read Contract
        • Write Contract
      • MetaproReferral
        • Read Contract
        • Write Contract
      • MetaproAirdrop
        • Read Contract
        • Write Contract
    • Universal Links & App Links with WalletConnect
  • 🔎General information
    • Blockchain
    • Blockchain Network Fee
    • Blockchain Native Token
    • Token ERC-1155 vs ERC-721
  • 📄Release Notes
    • Introduction to the Release Notes
    • Marketplace Updates
      • Release 07.03.2024
      • Release 06.03.2024
      • Release 04.03.2024
      • Release 19.02.2024
      • Release 24.01.2024
      • Release 09.01.2024
      • Release 03.01.2024
      • Release 21.12.2023
      • Release 18.12.2023
      • Release 13.12.2023
      • Release 12.12.2023
      • Release 02.12.2023
      • Release 30.11.2023
      • Release 24.11.2023
      • Release 22.11.2023
      • Release 17.11.2023
      • Release 13.11.2023
      • Release 09.11.2023
      • Release 08.11.2023
      • Release 07.11.2023
      • Release 31.10.2023
      • Release 26.10.2023
      • Release 25.10.2023
      • Release 24.10.2023
      • Release 18.10.2023
      • Release 05.10.2023
      • Release 03.10.2023
      • Release 29.09.2023
      • Release 18.09.2023
      • Release 14.09.2023
      • Release 12.09.2023
      • Release 06.09.2023
      • Release 25.08.2023
      • Release 17.08.2023
      • Release 04.08.2023
      • Release 31.07.2023
      • Release 21.07.2023
      • Release 18.07.2023
      • Release 13.07.2023
    • Games Launcher Updates
      • Release 13.03.2024
      • Release 24.01.2024
      • Release 04.01.2024
      • Release 22.11.2023
      • Release 03.10.2023
      • Release 31.07.2023
      • Release 27.07.2023
      • Release 20.07.2023
      • Release 13.07.2023
    • Wallet Updates
      • Release 04.03.2024
      • Release 03.10.2023
      • Release 29.09.2023
      • Release 15.09.2023
      • Release 30.08.2023
      • Release 18.07.2023
Powered by GitBook
On this page
  1. Developer Documentation
  2. Implementing Meta Assets into Your Game

Verify User Tokens Ownership

PreviousIntegrate your Meta Asset to your game using UnityNextDisplaying All User-Owned Tokens

Last updated 1 year ago

User verification process in brief:

  1. Obtain User's Wallet Address:

    • The user logs in, and the system retrieves access to the user's cryptocurrency wallet address.

  2. Check Token Ownership:

    • The system verifies whether the user owns a specific token in their collection.

  3. Use API Endpoint:

    • Utilizing the relevant API Endpoint, the system sends a query to verify the user's possession of the specified token.

  4. Grant Access:

    • If the API Endpoint's response confirms token ownership, the system grants the user access to the game, map, or other resources.

In this way, by combining information about the wallet address, checking for the ownership of a particular token in the user's collection, and using the appropriate API Endpoints, the system can effectively verify the user and provide them with access to specific in-game resources.

Before You Begin:

  • Prepare the User's Address, Contract Address, and Token ID(s) used in your game.

Below, you will find the endpoint used to retrieve tokens for a specific user. To check whether a user possesses specific tokens, use the 'tokens[contractAddress]' parameter in the request object. By utilizing this request, you need to determine which tokens from a particular contract are of interest and then receive information about how many of these tokens the user owns. For example, you can use cURL to obtain information on whether a specific user has, and if so, which tokens they own from the collection of tokens from the Degen Yoku Game.

NFT Service:

Returns all tokens owned by specific User

GET ../v1/user/{address}/tokens

Query Parameters

Name
Type
Description

skip

number

limit

number

contractAddress

string

standard

string

protocol

string

network

array[string]

categoryIds

array[number]

_items

boolean

networks

array[string]

id

number

protocols

array[string]

sort

object

address*

string

toknes

object

skipTokens

String

{
    "results": [
        {
            "_id": "63341a5e626025ac7c4511af",
            "address": "0xa293d68684be29540838dc8a0222de0c43c6b5b4",
            "createdBy": "0x62199ec934c1b4ae52dfa8064964f2332acbb0d5",
            "contractAddress": "0xa293d68684be29540838dc8a0222de0c43c6b5b4",
            "standard": "erc1155",
            "protocol": "metaprotocol",
            "network": "bnb-chain",
            "chainId": 56,
            "creationBlock": 21722028,
            "version": 0,
            "isListed": false,
            "isAsset": true,
            "createdAt": "2022-09-28T09:56:46.051Z",
            "__v": 0,
            "token": {
                "_id": "64a887b79832b155f2955b13",
                "_tokenId": 1182,
                "address": "0xa293d68684be29540838dc8a0222de0c43c6b5b4",
                "_quantity": 1977,
                "burn": false,
                "createdAt": "2023-07-07T21:46:31.159Z",
                "createdBy": "0x832735f45299c8b6f7263e758cadba766459cd21",
                "creationBlock": 29765675,
                "description": "Yo, what's crackin'? I'm Degen Youki, the baddest shiny cat with a massive dome in this galactic playground. Now, lemme school you on what sets me apart from the rest.\n\nDon't get it twisted, my name might sound like degenerate, but you've got it all wrong, my friend! Degen stands for decentralized generation. It's all about breaking free from the chains of the old ways and embracing the power of freedom, liberty, and independence. We're rockin' that crypto life, baby!\n\nForget about all that cute and sweet nonsense you see on the socials. The world ain't all milk and sugar, it's a wild and messed up place. That's where I come in, bringin' the raw truth and unfiltered realness.\n\nI'm the epitome of our culture, kickin' it with the big dogs like Frog, Apes, and the legendary Cryptopunks. Yeah, you know 'em well! We're a rowdy crew, carvin' our own path in this digital frontier.\n\nWe're always pushin' the envelope, exploring fresh ways to express ourselves and shatter the limits of this web3 universe we call home.\n\nSo, if you're ready to dive headfirst into this chaotic digital rollercoaster, join me on this wild ride. We're gonna rewrite the rules, smash through the norms, and redefine what it truly means to be a Degen in this vast universe.\n\nStrap yourself in, amigo, 'cause this journey is gonna be one hell of a bumpy, profanity-laden adventure!\n\nStay SAFU, stay Degen!",
                "extraFiles": [
                    "https://prdmetaassetfiles.blob.core.windows.net/02cc7ac4-502a-4ddb-b6e7-dadc9cb6d336/assets/a324344a-ebc5-45c4-bcde-0f9598d90b6f.mp4",
                    "https://prdmetaassetfiles.blob.core.windows.net/02cc7ac4-502a-4ddb-b6e7-dadc9cb6d336/assets/a9209bc6-b4df-4933-8b38-dceb4bb2ac0a.jpg",
                    "https://prdmetaassetfiles.blob.core.windows.net/02cc7ac4-502a-4ddb-b6e7-dadc9cb6d336/assets/ca6ebc36-bbf6-46f4-b3d9-8a27ea514328.jpg"
                ],
                "favorites": 27,
                "image": "https://gateway.metaproprotocol.com/0x049e/preview",
                "initialOwner": "0x832735f45299c8b6f7263e758cadba766459cd21",
                "minifiedImage": "https://gateway.metaproprotocol.com/0x049e/minified-preview",
                "owner": "0x832735f45299c8b6f7263e758cadba766459cd21",
                "properties": {},
                "tokenName": "Degen Youki OG",
                "transactionHash": "0x6be58cdc19cc9c1d5c0f21b4eaeda59a300a46b5ee562870a933407bc455576f",
                "updatedAt": "2023-10-19T16:37:31.934Z",
                "wishes": 6,
                "filesSpec": {
                    "item_experiance": [],
                    "common": {
                        "standard": [
                            {
                                "key": "asset_type",
                                "value": [
                                    "2D meta asset"
                                ],
                                "value_type": "string array"
                            },
                            {
                                "key": "asset_licence",
                                "value": "Royalty Free (RF)",
                                "value_type": "string"
                            },
                            {
                                "key": "asset_restriction",
                                "value": "Public meta asset",
                                "value_type": "string"
                            },
                            {
                                "key": "asset_tags",
                                "value": [
                                    "gaming asset",
                                    "character",
                                    "avatar"
                                ],
                                "value_type": "string array"
                            },
                            {
                                "key": "asset_tag_ids",
                                "value": [
                                    17,
                                    56,
                                    13
                                ],
                                "value_type": "integer array"
                            },
                            {
                                "key": "asset_category",
                                "value": "Avatars",
                                "value_type": "string"
                            },
                            {
                                "key": "asset_subcategories",
                                "value": [
                                    "Body shape"
                                ],
                                "value_type": "string array"
                            },
                            {
                                "key": "asset_category_ids",
                                "value": [
                                    18,
                                    19
                                ],
                                "value_type": "integer array"
                            }
                        ],
                        "2d_spec": [
                            {
                                "key": "asset_height",
                                "value": 0,
                                "value_type": "integer"
                            },
                            {
                                "key": "asset_width",
                                "value": 0,
                                "value_type": "integer"
                            },
                            {
                                "key": "asset_layers",
                                "value": false,
                                "value_type": "boolean"
                            }
                        ],
                        "3d_spec": [
                            {
                                "key": "asset_geometry",
                                "value": "",
                                "value_type": "string"
                            },
                            {
                                "key": "asset_polygons",
                                "value": 0,
                                "value_type": "integer"
                            },
                            {
                                "key": "asset_vertices",
                                "value": 0,
                                "value_type": "integer"
                            },
                            {
                                "key": "asset_materials",
                                "value": false,
                                "value_type": "boolean"
                            },
                            {
                                "key": "asset_textures",
                                "value": false,
                                "value_type": "boolean"
                            },
                            {
                                "key": "asset_uv_mapped",
                                "value": false,
                                "value_type": "boolean"
                            },
                            {
                                "key": "asset_animated",
                                "value": false,
                                "value_type": "boolean"
                            }
                        ],
                        "sound_spec": [
                            {
                                "key": "asset_bpm",
                                "value": 0,
                                "value_type": "integer"
                            },
                            {
                                "key": "asset_sample_rate",
                                "value": "",
                                "value_type": "string"
                            },
                            {
                                "key": "asset_bit_depth",
                                "value": 0,
                                "value_type": "integer"
                            },
                            {
                                "key": "asset_channels",
                                "value": "",
                                "value_type": "string"
                            },
                            {
                                "key": "asset_duration",
                                "value": "",
                                "value_type": "string"
                            },
                            {
                                "key": "asset_isrc_code",
                                "value": "",
                                "value_type": "string"
                            }
                        ]
                    }
                }
            }
        }
    ],
    "count": 6
}
{
    "statusCode": 400,
    "messages": [
        "Some message"
    ],
    "error": "Bad Request"
}
{​
  "statusCode": 404,​
  "messages": [​
    "Not found!"​
  ],​
  "error": "Not Found"​
​}
Example cURL
curl --location --globoff 'https://api.metaproprotocol.com/ms/nft/v1/user/0x832735f45299c8b6f7263e758cadba766459cd21/tokens?tokens%5B0xa293d68684be29540838dc8a0222de0c43c6b5b4%5D=[1182%2C1227%2C1229%2C1230%2C1228%2C1248]' \
--header 'accept: application/json'

For more information about the Endpoints from the NFT Service, use the documentation below

👨‍💻
https://api.metaproprotocol.com/ms/nft/docs/#/
API