getwalletNfts tokenaddresses

there seems to be an issue with the getwalletnfts endpoint. when I input an address without the tokenAddresses filter everything works just fine however as soon as I add tokenAddresses everything breaks. what is the issue?

if I remove the tokenAddresses it returns nfts, if I add them I get a 200 response without any nfts listed despite the owner having the nfts from those collection


try {
  await Moralis.start({
    apiKey: "YOUR_API_KEY"
  });

  const response = await Moralis.EvmApi.nft.getWalletNFTs({
    "chain": "0x1",
    "format": "decimal",
    "normalizeMetadata": true,
    "tokenAddresses": [
      "0xbc4ca0eda7647a8ab7c2061c2e118a18a936f13d",
      "0x8a90CAb2b38dba80c64b7734e58Ee1dB38B8992e"
    ],
    "mediaItems": false,
    "includePrices": false,
    "address": "0x7eb4...36c43f6"
  });

  console.log(response.raw);
} catch (e) {
  console.error(e);
}```

kindly assist. this is still a problem

with Moralis, the issue is almost always how the token_addresses parameter is formatted in your request. Unlike some other providers, Moralis expects an array of strings
How to correctly use token_addresses in Moralis
•Correct: token_addresses=0xABC…&token_addresses=0xDEF…
•Wrong: token_addresses=0xABC…,0xDEF… (Moralis doesn’t parse comma-separated lists here)

Hi @CleanMcGerk, We have a known issue with the tokenAddresses filters. Our team is looking into it.

As a temporary fix, please avoid using more than 1 address in the tokenAddresses filter.

1 Like