getAllERC20 with ethers & nodejs

Hi everyone,
I’m using nodejs and ethers, as well as moralis speedynode as provider.
I’d like to get all the tokens of my wallet address, but didn’t find anything useful on the net expect the function provided by moralis here : getAllERC20.
What do I need to call this function? Can it be called with the Provider? Is there some other solution?

Thanks.

Hi,
Maybe this is what you are looking for:

curl -X 'GET' \
  'https://deep-index.moralis.io/api/v2/<your_address_here>/erc20?chain=eth' \
  -H 'accept: application/json' \
  -H 'X-API-Key: <your_api_key_here>'

or this:
https://docs.moralis.io/moralis-server/transactions-and-balances/token-balances

Thanks,
I suppose I just have to require ‘moralis’ in JS.
I’ll check tha.