Transffering of NFTs Help? pls

Hi,

I’ve follow the code in this page.

https://docs.moralis.io/moralis-server/sending-assets?utm_source=blog&utm_medium=post&utm_campaign=How%20to%20Transfer%20NFTs%20with%20One%20Line%20of%20Code

But I’ve been getting some errors. So here or there I try to add some stuff. But still end up with more errors. Code is bellow.

<html>
  <head>
    <title>Vanilla Boilerplate</title>
    <script src="https://cdn.jsdelivr.net/npm/[email protected]/dist/web3.min.js"></script>
    <script src="https://unpkg.com/moralis/dist/moralis.js"></script>
  </head>

  <body>
    <h1>Moralis Hello World!</h1>
    <button id="btn-runcode" onclick="runcode()">Run Code</button>
    <br/><br/>
  
    <script>

        async function runcode(){
          //          alert("hello")
    
          // sending 15 tokens with token id = 1
          
          //Moralis.enableWeb3()
          
          Moralis.authenticate()

          const options = {type: "erc1155",  
                       receiver: "0xD01dd359564B503fCdC1d2D7995984eB9bd8F28d",
                       contractAddress: "0xaB8767b4FFaAeA81ec878F61B7C94Ec90E10589c",
                       tokenId: 1,
                       amount: 1}
          let result = await Moralis.transfer(options)

        }
    </script>
  </body>
</html>

Current error is bellow.

moralis.js:25696 Uncaught (in promise) Error: You need to call Parse.initialize before using Parse.
    at Object.generatePath (moralis.js:25696)
    at Object.currentUserAsync (moralis.js:24379)
    at Function.value (moralis.js:23769)
    at Function.<anonymous> (moralis.js:5287)
    at tryCatch (moralis.js:28070)
    at Generator.invoke [as _invoke] (moralis.js:28300)
    at Generator.next (moralis.js:28125)
    at asyncGeneratorStep (moralis.js:27579)
    at _next (moralis.js:27601)
    at moralis.js:27608
moralis.js:6296 Uncaught (in promise) Error: Missing web3 instance, make sure to call Moralis.enableWeb3() or Moralis.authenticate()
    at Function.<anonymous> (moralis.js:6296)
    at tryCatch (moralis.js:28070)
    at Generator.invoke [as _invoke] (moralis.js:28300)
    at Generator.next (moralis.js:28125)
    at asyncGeneratorStep (moralis.js:27579)
    at _next (moralis.js:27601)
    at moralis.js:27608
    at new Promise (<anonymous>)
    at new Wrapper (moralis.js:32482)
    at Function.<anonymous> (moralis.js:27597)

Hi @CocoCabana

You need to provide your server details. Take a look at an example here:

https://docs.moralis.io/moralis-server/getting-started/connect-the-sdk#main.js-1