Allow a script to access a google worksheet and return a JSON without authentication

3

I was thinking of using a google docs worksheet as a persistence of an application that I'm going to develop.

For this, I made the following script in the google script editor

function doGet(e) {
    var dados = SpreadsheetApp.openById(ID_DA_MINHA_SHEET).getSheetByName("Tabela 1").getDataRange();
    var res = {'Data': dados.getCell(1, 1).getValue()};
    return HtmlService.createHtmlOutput(JSON.stringify(res));
}

I have already defined my spreadsheet with public visibility, so I do not need to ask for permissions to access it.

Running in the browser and logged into my account, the script works perfectly, returns json and everything.

But when I am not logged in, it always asks for authentication, even if it works when logging in with another account.

How to make it display directly without having to go through this step?

    
asked by anonymous 21.06.2015 / 02:13

0 answers