简体   繁体   中英

Google Apps Script oAuth 2.0

I'm using Google Query and Google Apps Script to create information pages (draw tables, graphics etc) inside Google Drive.

Since yesterday all pages, that I've created, are falling down with this message:

Error in query: ACCESS_DENIED. This spreadsheet is not publicly viewable and requires an OAuth credential.

I understand that Google wants me to use oAuth 2.0 however I'm unsure how to do this since every page is enabled only for registered Google users and of course it requires basic Google authentication.

Does anyone have any ideas on how to include oAuth 2.0 into Script inside Google Drive, which is already using oAuth 2.0 (At least I guess it is)?

There are a number of ways of using OAuth 2.0 within Google Apps Script depending on what you're trying to achieve. See here and here , for examples.

Perhaps you could post your sample code, explaining what you're looking to do and where it is going wrong?

We had this problem couple of days ago. We created an add-on which helped us resolve the following problem. Please go through this link to create an add-on

Then gapi js was able to communicate with our spreadsheet even when private. Hope it helps.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM