Is there a way to access an object stored in a non-public google bucket using app-script?
i have this function which works for publicly available files, but i cant seem to find any documentation on how to access a non-public bucket?
How do i Authorize an app script to access a bucket?
function import_data_from_bucket() {
var url = 'XXXXXXXXXXXXXXXXXXXXXXXXXXXXX.txt';
var text = UrlFetchApp.fetch(url).getContentText();
var csv = Utilities.parseCsv(text, ',');
var sheet = SpreadsheetApp.getActiveSpreadsheet().getSheetByName("Sheet1");
sheet.getRange(1, 1, csv.length, csv[0].length).setValues(csv);
}