TypeError: Cannot read properties of undefined (reading 'access_token')

Service of node js that is using “asposewordscloud”: “^18.2.1”, responds with:“Cannot read properties of undefined (reading ‘access_token’)”, I’m using credentials provided by free trial account, this is the code:

import {
  WordsApi,
  PutConvertDocumentRequest,
} from "asposewordscloud";

const wordsApi = new WordsApi(
  Proccess.env.ASPOSE_CLIENT_ID,
   Proccess.env.ASPOSE_SECRET,
);
  private async docxHtml() {
    try {
      const inputFile = fs.readFileSync(this.file.path);
      wordsApi
        .putConvertDocument(
          new PutConvertDocumentRequest({
            document: inputFile,
            format: "html",
          })
        )
        .then((result) => {
          fs.writeFileSync("output.html", result.body);
        })
        .catch((error) => {
          console.error({error});
        });
    } catch (error) {
      console.log({ error });
    }
  }

@nicolasmayorquinduran

Please note that you are using a quite old SDK version. Please use the latest release of Aspose.Words Cloud SDK for Node.js; it will resolve the issue.