NFT API returning 0 NFTs

hey team! I have a nft contract on mumbai testnet. I’m using moralis to get owners of the nft. its an ERC1155. the method I’m mainly interested is getNFTsForContract as documented here. I am specifying options as

const options = {
  chain: "mumbai",
  address: "0x9c138706fa85b85b86e1b7e97182501fccf8e82e",
  token_address: "0x099Fb655a7bb4df994243acb1A0B5a28d9ca2924",
}

It returning me no NFTs. however as proof I am attaching screenshots the the address infact has the nfts.

screenshot: proof that address holds nft (token id 25 for example)


you can verify yourself on mumbai explorer as well

please help and thanks in advance!

1 Like

it looks like this works:

x = await Moralis.Web3API.account.getNFTsForContract({
  chain: "mumbai",
  address: "0x9510a5cbde44227c00cf36ff5d2f8b6b72ddcd55",
  token_address: "0x099Fb655a7bb4df994243acb1A0B5a28d9ca2924",
})

it looks like the other NFTs are not indexed yet

this also seems to work:

x = await Moralis.Web3API.account.getNFTsForContract({
  chain: "mumbai",
  address: "0x74a3c8511e709b6463adeed6ec1b273886cefc13",
  token_address: "0x099Fb655a7bb4df994243acb1A0B5a28d9ca2924",
})
1 Like

yeah those accounts work. those are my test accounts as well.

  • what’s the solution for this or maybe more accounts not being tracked?

We will have to investigate why those particular NFTs don’t show

it should be fixed now

This doesn’t work for me querying for my NFT, returns empty page…

const x = await Moralis.Web3API.account.getNFTsForContract({
chain: “mumbai”,
address: “0x849a9B1d122b8E417D4442fAdb389acdBE29Df6d”,
token_address: “0x849a9B1d122b8E417D4442fAdb389acdBE29Df6d”,
})

try this:

t = await Moralis.Web3API.account.getNFTsForContract({
chain: "mumbai",
address: "0xe8f9a288554faabbaca8c6946bf2e3a07b685c12",
token_address: "0x849a9B1d122b8E417D4442fAdb389acdBE29Df6d",
})

in that example the address is the same as token_address, it is not going to work that way

“address” is not a good name here. probably “owner_of” would be better as that’s what it’s called in the response