Error 400 with getAllTokenIds, use CHROME and VSC

Hello i have some issue juste don’t understand why I have this error I see topics with getNFTs have the same problem so I just check web3 API and test its ok on Moralis.io, I reset the server but have the 400 error in my browser I use CHROME.
I follow the yt tuto with ivontech :slight_smile:
my js =>

Moralis.initialize("nTRalsoxJeH0LGBm4JUjidYfWgBJWe9rCnlFb3Fo");
Moralis.serverURL = "https://ywk66wksiont.moralishost.com:2053/server";

async function initializeApp() {
    let currentUser = Moralis.User.current();
    if (!currentUser) {
        currentUser = await Moralis.Web3.authenticate();
    }
    //alert("User is signed in");
    const options = { adress: "0xb5e0ac7bbf88ccc7674bbd88f9fe8d3f1a050fdc", chain: "rinkeby"};
    const NFTs = await Moralis.Web3API.token.getAllTokenIds(options);
    console.log(NFTs);
}
initializeApp();

thank you for ur support :slight_smile:

Hey @chinois

Please share the error message

moralis.js:22981 POST https://ywk66wksiont.moralishost.com:2053/server/functions/getAllTokenIds 400

i have also this =>
moralis.js:25325 Uncaught (in promise) Error: Error: required param address not provided
at handleError (moralis.js:23112)
at async initializeApp (main.js:11)

It looks like you had adress instead of address

     options = { address: "0xb5e0ac7bbf88ccc7674bbd88f9fe8d3f1a050fdc", chain: "rinkeby"};
     NFTs = await Moralis.Web3API.token.getAllTokenIds(options);

hoooo :frowning: my bad I just don’t see it sorry for the inconvenience :frowning:

thank you I would like to kill me just 3 hour I search why haha

1 Like