Earlier my funtion code was working fine till the 30 Dec 2022, but now it is throwing error as following -
Message details
Exception: Request failed for
https://archives.nseindia.com returned code 403. Truncated server response: <HTML><HEAD> <TITLE>Access Denied</TITLE> </HEAD><BODY> <H1>Access Denied</H1> You don't have permission to access "http://archives&#... (use muteHttpExceptions option to examine full response).
If still I change highlighted date in url then it works fine for the date befor 01 Jan 2023 but when i set date after 30 Dec 2023 then it throwing error, In this same funtion many other url are working fine like "
https://archives.nseindia.com/content/fo/fo.zip"- friends Can any one help me to rectify it.
Code
function fetchData() {
var zipblob = UrlFetchApp.fetch(url).getBlob();
var unzipblob = Utilities.unzip(zipblob);
var unzipstr = unzipblob[0].getDataAsString();
var csv = Utilities.parseCsv(unzipstr);
sheet.getRange('A7:O').clearContent();
sheet.getRange(6, 1, csv.length, csv[0].length).setValues(csv);
}