Documentation clarity

Hi! I’m looking for some clarity in the getNFTsForContract API.

the documentation says the address(owner of given token) is a required parameter, followed by the token_address.

Is it possible to use the user/session to supply the owner address?

const currentUser = Moralis.User.Current();
const options = {`chain: "eth", address: ${currentUser}, token_address: "hidden"`};

Or is this unnecessary and Moralis already supplies that user address depending on if one is logged in/authenticated.


Hey @juno as mentioned in the docs that address is clearly a required parameters :raised_hands:. However, I do spot a mistake there in your syntax. First, the options should be a JSON object and there you seem to stringify it in a strange way that may be invalid to JS, so to resolve it remove that backtick. Second, it should be Moralis.User.current() to get the Moralis User Object, but for getting the address it should be `Moralis.User.current().get(“ethAddress”). Therefore, your code should look like this:

const currentUser = Moralis.User.current().get("ethAddress");
const options = {
   chain: "eth",
   address: currentUser,
   token_address: "hidden"