Displaying All User-Owned Tokens

In this section, you will learn how to display all the tokens owned by a specific user. However, if you wish to showcase only the tokens directly related to your game on your platform, refer to the example provided in the previous section. Utilize the parameter tokens[ContractAddress]=[TokenIDs] to precisely define which tokens should be included in the displayed results. This mechanism allows for the customization of token visibility according to specified criteria, tailoring the presented information to the specifics of your game.

NFT Service: https://api.metaproprotocol.com/ms/nft/docs/#/

Returns tokens from that are owned by a specific User

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

Query Parameters

NameTypeDescription

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,
            "owner": {
                "_id": "63341a5e626025ac7c4511b7",
                "address": "0xa293d68684be29540838dc8a0222de0c43c6b5b4",
                "owner": "0x832735f45299c8b6f7263e758cadba766459cd21",
                "_tokenId": 1001,
                "_quantity": 41,
                "role": [],
                "socialMedia": [],
                "createdAt": "2022-09-28T09:56:46.842Z",
                "updatedAt": "2023-09-10T20:49:39.981Z"
            },
            "token": {
                "_id": "63341a5e9832b155f241b695",
                "_tokenId": 1001,
                "address": "0xa293d68684be29540838dc8a0222de0c43c6b5b4",
                "_quantity": 100,
                "burn": false,
                "createdAt": "2022-09-28T09:56:46.550Z",
                "createdBy": "0x832735f45299c8b6f7263e758cadba766459cd21",
                "creationBlock": 21722028,
                "description": "MetaDude is a ready-to-import into Unity, low polly, full-body, textured 3D avatar with standard Mixamo rig.  ",
                "image": "https://prd-pod-1.metaprotocol.one/0x03e9/preview",
                "initialOwner": "0x832735f45299c8b6f7263e758cadba766459cd21",
                "owner": "0x832735f45299c8b6f7263e758cadba766459cd21",
                "properties": {},
                "tokenName": "MetaDude",
                "transactionHash": "0xfcb5da8a77f4d312476911fb43e63a9b9a445788cc916ca6bc16c0c880aa3344",
                "updatedAt": "2023-04-07T16:16:55.340Z",
                "favorites": 8,
                "extraFiles": [],
                "minifiedImage": "https://prdmetapropreviews.blob.core.windows.net/previews/0xa293D68684Be29540838Dc8A0222De0c43c6b5B4_1001.webp",
                "filesSpec": {
                    "item_experiance": [],
                    "common": {
                        "standard": [
                            {
                                "key": "asset_tags",
                                "value": [
                                    "avatar",
                                    "Unity",
                                    "full-body",
                                    "Mixamo"
                                ],
                                "value_type": "string array"
                            },
                            {
                                "key": "asset_tag_ids",
                                "value": [
                                    13,
                                    14,
                                    15,
                                    16
                                ],
                                "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": [],
                        "3d_spec": [
                            {
                                "key": "asset_geometry",
                                "value": "Polygonal Quads/Tris",
                                "value_type": "string"
                            },
                            {
                                "key": "asset_polygons",
                                "value": 7230,
                                "value_type": "integer"
                            },
                            {
                                "key": "asset_vertices",
                                "value": 21690,
                                "value_type": "integer"
                            },
                            {
                                "key": "asset_materials",
                                "value": true,
                                "value_type": "boolean"
                            },
                            {
                                "key": "asset_textures",
                                "value": true,
                                "value_type": "boolean"
                            },
                            {
                                "key": "asset_uv_mapped",
                                "value": true,
                                "value_type": "boolean"
                            },
                            {
                                "key": "asset_animated",
                                "value": true,
                                "value_type": "boolean"
                            }
                        ],
                        "sound_spec": []
                    }
                }
            }
        }
    ],
    "count": 23
}
Example cURL
curl --location 'https://api.metaproprotocol.com/ms/nft/v1/user/0x832735f45299c8b6f7263e758cadba766459cd21/tokens' \
--header 'accept: application/json'

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

pageAPI

Last updated