{code: 141, error: 'Invalid Address!'} for getNFTTransfers

Getting {code: 141, error: 'Invalid Address!'} when calling getNFTTransfers. I am using the Moralis SDK along with react-moralis.

The address that I am passing in IS valid and I have tried multiple addresses. I do NOT receive this error when calling getNFTsForContract.

These are the versions I am using:

"moralis": "0.0.138",
"react-moralis": "^0.3.0",

Any help is greatly appreciated.

Thank you

Hi @ISleepWithSocksOn

We need to see your code, also please provide your server subdomain

This is how I am calling getNFTTransfers.

Moralis.Web3API.account
      .getNFTTransfers({
        chain: 'eth',
        direction: 'to',
        address: '0x1cA6e4643062e67CCd555fB4F64Bee603340e0ea'
      })
      .then((data: any) => {
        console.log('data', data);
      })
      .catch((err: any) => console.log('err', err));

This is my server: qoqqub0hm0l6.usemoralis.com

Let me know if any other data is needed. Not sure why getNFTsForContract works but getNFTTransfers does not.

Thank you

1 Like

there is a known problem with direction now, this works fine:

x = await Moralis.Web3API.account
      .getNFTTransfers({
        chain: 'eth',
        direction: 'both',
        address: '0x1cA6e4643062e67CCd555fB4F64Bee603340e0ea'
      })
1 Like

Getting {code: 141, error: 'Invalid Address!'} when calling getNFTs from a React client. I am using the Moralis SDK along with react-moralis too.

These are the versions I am using:

"moralis": "^1.8.0",
"react-moralis": "^1.4.0",

Thank you

await Web3Api.account.getNFTs({
        chain: "eth",
        address: "0x7673085fEa23d962F7bb95746183C8Ad1219D741"
});

this works fine for me in vanilla js:

await Moralis.Web3API.account.getNFTs({
        chain: "eth",
        address: "0x7673085fEa23d962F7bb95746183C8Ad1219D741"
});

sorry, then something definitely wrong with my API key or application. Could you please check, since support assistant has already reset my api key and nodes, however it didn’t help.

your API key works fine, it has to be something else, you can also test it directly in web3api interface in https://admin.moralis.io/web3apis

okay, thanks.

Will check it out and let you know.

Is it possible that you’ve banned our application?
btw, just fyi, I am using Application ID, and Dapp Server url just for connecting to moralis.
I assume, I should use API key, but I can’t figure out how should I do that in Client side, since it won’t be secure.

it doesn’t look like a ban, you can check in network tab to see what data is sent to the server when it gets that error

Okay, it seems the problem was that we were not using API key while trying to connect.
Now it is working correct.
Thanks for your support.

1 Like