[SOLVED] This user is not allowed to access non-existent class

I try to create new class table using js script

const Moralis = require("moralis/node");

/* Moralis init code */
const serverUrl = "";
const appId = "";
const masterKey = "";

const saveData = async () => {
  await Moralis.start({ serverUrl, appId, masterKey });

  const Monster = Moralis.Object.extend("Monster");
  const monster = new Monster();

  monster.set("strength", 1024);
  monster.set("ownerName", "Aegon");
  monster.set("canFly", true);

  await monster.save();


Getting error

$ ts-node db/fill_db.ts

        error = new _ParseError.default(errorJSON.code, errorJSON.error);
Error: This user is not allowed to access non-existent class: Monster
    at handleError (/Users/dominik/blockchain/node_modules/moralis/lib/node/RESTController.js:423:17)
    at processTicksAndRejections (node:internal/process/task_queues:96:5)

You have to use the master key parameter here on this like for .save

You have to use null as first parameter


save need to be made with

await monster.save(null,{useMasterKey:true});

you need to update this in the cods