'How get nft-tokens of a contract which are available in a wallet address by web3

I have a NFTs-Contract address on ethereum. I want to know a wallet address have which token of my contract. How can I get list of tokenId which are in a wallet address by web3?

const Web3 = require("web3");const provider = "https://lively-withered-grass.quiknode.pro"
const Web3Client = new Web3(new Web3.providers.HttpProvider(provider));
const minABI = [
    {
        constant: true,
        inputs: [{name: "_owner", type: "address"}],
        name: "balanceOf",
        outputs: [{name: "balance", type: "uint256"}],
        type: "function",
    },
];
const tokenAddress = "0x0d8775f648430679a709e98d2b0cb6250d2887ef";
const walletAddress = "0x1cf56Fd8e1567f8d663e54050d7e44643aF970Ce";
const contract = new Web3Client.eth.Contract(minABI, tokenAddress);
async function getBalance() {
    const result = await contract.methods.balanceOf(walletAddress).call();
    const format = Web3Client.utils.fromWei(result); // 29803630.997051883414242659
    console.log(format);
}
getBalance();

I am able to know that in a wallet address whether or not any my token but it doesn't give me any information about which token are existed in wallet.

What's your opinion? Do you have any solution?



Solution 1:[1]

you must be use from etherscan.io service's(API's)

for your problem you can use this and parse information till get access your request

https://docs.etherscan.io/api-endpoints/accounts#get-a-list-of-erc721-token-transfer-events-by-address

Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source
Solution 1 Hossein Asadi