Oto mój skrypt do logowania. W arkuszu googla kolejność kolumn user(full name), email, hasło
po podaniu poprawnych danych logowania tj email i hasła. Respose type daje 200. Zapytanie nie zwraca błedu oraz fullName var getFullName =ts.getRange(1,1).getValue();
function Authentication(e)
{
if (e.parameter.func == "Login")
{
var ss = SpreadsheetApp.openByUrl("https://docs.google.com/spreadsheets/d/1-WJLtFfREfV-8N6PC4bBSBX-3-7iFZV95nzToWwHEHQ/edit#gid=0");
var sh = ss.getSheetByName("Sheet1");
var email = e.parameter.email;
var password = e.parameter.password;
var rg = sh.getName() + "!" + sh.getDataRange().getA1Notation();
var sql = '"Select A,B,C where B =''+email+''"';
var qry = '=IFERROR(query(' + rg + ',' + sql + '),"")';
var ts = ss.insertSheet();
var setQuery = ts.getRange(1,1).setFormula(qry);
var getResult = ts.getDataRange().getValues();
var getPWD = ts.getRange(1,3).getValue();
var getFullName =ts.getRange(1,1).getValue();
ss.deleteSheet(ts);
if (getResult!="")
{
if (getPWD==password){return ContentService.createTextOutput(getFullName);}
else {return ContentService.createTextOutput("ERPWD");}
}
else {return ContentService.createTextOutput(getResult);}
}
}