I am trying to create content block in content builder using ssjs code but I am getting error, please check below code and how to resolve the issue?
<script runat="server">
Platform.Load("Core","1");
try {
Write("start</br>");
var asset = Platform.Function.CreateObject("Asset");
var nameIdReference = Platform.Function.CreateObject("NameIdReference");
Platform.Function.SetObjectProperty(nameIdReference, "Id", 197); //html block type
Platform.Function.SetObjectProperty(asset, "AssetType", nameIdReference);
var categoryNameIdReference = Platform.Function.CreateObject("CategoryNameIdReference");
Platform.Function.SetObjectProperty(categoryNameIdReference, "Id", 69208);
Platform.Function.SetObjectProperty(asset, "Category", categoryNameIdReference);
Platform.Function.SetObjectProperty(asset, "Name", "SSJS HTML Content Block");
Platform.Function.SetObjectProperty(asset, "Content", "<div>my new content</div>");
Platform.Function.SetObjectProperty(asset, "ContentType", "text/html");
var statusAndRequest = [0,0];
var response = Platform.Function.InvokeCreate(NameIdReference, statusAndRequest, null);
Write(response.toString() + "</br>");
Write(statusAndRequest.toString() + "</br>");
Write("end</br>");
} catch (err) {
Write(Stringify(err) + "</br>");
}
</script>