[英]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. 我正在使用Google查询和Google Apps脚本在Google云端硬盘中创建信息页面(绘制表格,图形等)。
Since yesterday all pages, that I've created, are falling down with this message: 从昨天开始,我创建的所有页面都会显示以下消息:
Error in query: ACCESS_DENIED.
查询错误:ACCESS_DENIED。 This spreadsheet is not publicly viewable and requires an OAuth credential.
此电子表格不可公开查看,需要OAuth凭据。
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. 我了解Google希望我使用oAuth 2.0,但我不确定如何执行此操作,因为每个页面仅针对注册的Google用户启用,当然它需要基本的Google身份验证。
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)? 有没有人对如何将oAuth 2.0包含在Google云端硬盘内的脚本中有任何想法,这已经在使用oAuth 2.0(至少我猜它是这样)?
There are a number of ways of using OAuth 2.0 within Google Apps Script depending on what you're trying to achieve. 根据您要实现的目标,有多种方法可以在Google Apps脚本中使用OAuth 2.0。 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. 然后,即使私有,gapi js也可以与我们的电子表格进行通信。 Hope it helps.
希望能帮助到你。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.