"getAllTokenIds" Is Broken?

My code:

const options = {

    query: {
      /** The chain to query */
      chain: 'mumbai',
      /** The format of the token id */
      format: "decimal",
      /** limit */
      limit: 10
    },
    path: {
      /** Address of the contract */
      address: "0x7441EB02527d1c997Baf7484cc9deeDA55d9FadC"
    }
  }

  const nftDataCall = await Moralis.Web3API.token.getAllTokenIds(options)

  console.log('call result');
  console.log(nftDataCall.result);

This just returns empty array… is Moralis server broken? :thinking:

you can check the documentation here, that options doesn’t seem ok with query and path:
https://docs.moralis.io/moralis-dapp/web3-api/nft-api#getalltokenids

Thanks. It works but is giving me incorrect data now…

Can you send us what you getting?

Using the getAllTokenIds returnsEmpty Result Fetch

From Chrome Console

The address is for Cryptopunks

Using Web3Api from Moralis Admin

Can you paste that address?

0x6fb89b812c757b87e4dcc638d284e8735c9229bd

This address isn’t a contract address, You can use https://docs.moralis.io/moralis-dapp/web3-api/nft-api#getnfts for this rather

Thank you, the contract address 0xb47e3cd837dDF8e4c57F05d70Ab865de6e193BBB returned desired results

Trying to get Token list for address 0x2953399124F0cBB46d2CbACD8A89cF05999749630, polygon chain listed on OpenSea.

getAllTokensId returns empty results, Web3Api from admin returns a Failed to Fetch response.

Can’t get any result for this address on the explorer. It’s the address attached to nfts manually uploaded to opensea.

I have no idea of that, but here’s the address on PolygonScan

Yes this will have issues as there are a large amount of tokens within the OpenSea Collections contract, so it will time out. You can try using the OpenSea API.

1 Like

Thank you, will try that.

My data is outdated and incorrect. basically, I have to do a call to moralis to get “my NFTs” (for current user) and then call directly for to the “tokenURI” function for each token_id… so inefficient, but… shrug emoji