400 error when getNFTs (rinkeby)

I’m having difficulties getting nft’s for the connected address. I’m using react-moralis.

      const userAddr = user?.get("ethAddress");

      const userEthNFTs = account
        .getNFTs({ chain: "rinkeby", address: userAddr })
        .then((res) => console.log(res.result));

I wanted to test it out by logging the result. But I’m getting the following error.


Anyone know what the problem is?

You could double check if the address is set when calling getNFTs.

seems to be set.
logged address right before the getnft’s

could you also paste that address so that I can test getNFTs with it?

Same error, unfortunately.

I mean to paste the address here in forum so that I can copy it.


I get this in vanilla js:

x = await Moralis.Web3API.account.getNFTs({ address: “0xabc2ecc5bbdd20a5fde8a0b1eced7595ae4d0379”, chain: “rinkeby” })

{total: 0, page: 0, page_size: 500, result: Array(0), status: ‘SYNCING’}

This is the only Web3Api function that gives you errors?

Does this mean it’s not the code but the server or node that is syncing?

Tested out .getTransactions, same error

new info:

x = await Moralis.Web3API.account.getNFTs({ address: “0xabc2ecc5bbdd20a5fde8a0b1eced7595ae4d0379”, chain: “rinkeby” })
{total: 10, page: 0, page_size: 500, result: Array(10), status: ‘SYNCED’}

It may be a problem with your server, you can check first if https://admin.moralis.io/web3Api works for you for a simple query from there. Then you could restart/update your server.

Oh suddenly it works :thinking:

wonder what the problem was

After you have visited https://admin.moralis.io/web3Api ?

yes worked after visiting the web3api

1 Like