简体   繁体   English

Google Apps脚本oAuth 2.0

[英]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.

相关问题 从 Google Apps 脚本 (GAS) 到 Sheets API 的 OAuth 2.0 - OAuth 2.0 from Google Apps Script (GAS) to Sheets API 为Google用户设置签名:使用oAuth2.0更改代码oAuth1.0(Google Apps脚本) - Set signature for Google user: change code oAuth1.0 with oAuth2.0 (Google Apps Script) 如何将OAuth 2.0与带有静态重定向URL的Google Apps脚本库一起使用? - How to use OAuth 2.0 with a Google Apps Script library, with a static redirect URL? 使用 OAuth 令牌通过 Apps 脚本连接到 GSuite 管理服务 - 范围 https://apps-apis.google.com/a/feeds/emailsettings/2.0/ - Connect to GSuite Admin Service through Apps Script with OAuth token - scope https://apps-apis.google.com/a/feeds/emailsettings/2.0/ google Apps 脚本 webapps 的 google OAuth 登录 - google OAuth login for google Apps Script webapps 2.0在Google Apps脚本中被确认为20 - 2.0 is recognized as 20 on google apps script 找不到OAuth客户端 - Google Apps脚本 - BigQuery - The OAuth Client was not found - Google Apps Script - BigQuery Google Apps脚本“升级的授权体验”和OAuth - Google Apps Script “Upgraded Authorisation Experience” and OAuth 使用Google Apps脚本在电子表格中授权OAuth? - Authorize OAuth in Spreadsheet with Google Apps Script? Apps Script 和 Google Chat 的 OAuth 问题 - OAuth problem with Apps Script and Google Chat
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM