简体   繁体   English

G Suite Marketplace 插件 OAuth:错误 400:invalid_request 帐户受限

[英]G Suite Marketplace Add-on OAuth: Error 400: invalid_request Account restricted

Has any Google Add-on developers received this error when a user trys to install:当用户尝试安装时,是否有任何 Google 插件开发人员收到此错误:

Error 400: invalid_request Account Restricted错误 400:invalid_request 帐户受限

This only happens to some users even if the app is whitelisted in the domain admin console of the user.即使应用程序在用户的域管理控制台中被列入白名单,这种情况也只会发生在某些用户身上。 Our app is listed on the G Suite Marketplace and is approved and verified, the OAuth consent screen works for most users.我们的应用已在 G Suite Marketplace 上架并获得批准和验证,OAuth 同意屏幕适用于大多数用户。 The user is able to see the consent screen but as soon as they click Accept they get this error:用户能够看到同意屏幕,但一旦他们点击接受,他们就会收到此错误:

在此处输入图片说明

I had the same issue with one of my G Suit accounts.我的一个 G Suit 帐户遇到了同样的问题。 In my case, there was an issue with one of the scopes that the Google Spreadsheet script has been using.就我而言,Google 电子表格脚本一直使用的范围之一存在问题。 To be more specific https://www.googleapis.com/auth/classroom.topics.readonly .更具体的https://www.googleapis.com/auth/classroom.topics.readonly This scope is required if you want to work with topics in Google Classroom.如果您想在 Google Classroom 中处理主题,则需要此范围。 I am pretty sure there was some kind of account restriction but unfortunately, I was not able to find the respective setting in Google Admin Console.我很确定存在某种帐户限制,但不幸的是,我无法在 Google 管理控制台中找到相应的设置。 I have contacted G Suite Support as someone suggested here but they were not able to help me.我已按照此处的建议联系了 G Suite 支持,但他们无法帮助我。 Eventually, I had to remove this scope from my script and it worked fine but you may have issues with other scopes and here is how you can find out which one is causing the problem.最终,我不得不从我的脚本中删除这个范围,它运行良好,但您可能会遇到其他范围的问题,这里是您如何找出导致问题的原因。

Steps脚步

  1. Find an account that consistently has this issue查找始终存在此问题的帐户
  2. Create new google spreadsheet创建新的谷歌电子表格
  3. Go to the Tools -> Script Editor转到工具 -> 脚本编辑器
  4. Click View -> Show Manifest file.单击查看 -> 显示清单文件。 This will create a manifest file called appsscript.json这将创建一个名为appsscript.json清单文件
  5. Then start adding scopes from your list of scopes one by one to the oauthScopes field in a json file.然后开始将范围列表中的范围一一添加到 json 文件中的oauthScopes字段。 If it's not there then add it如果它不存在,则添加它
  6. Click Run -> Run function -> your function点击运行 -> 运行函数 -> 你的函数

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 无法将Google编辑器附加组件发布到G Suite市场 - Unable to publish Google editor add-on to the G Suite Marketplace 在G Suite帐户上安装开发者Gmail加载项 - Installing developer gmail add-on on G Suite account 当我在 G-Suite 市场上更新 GAS 插件时,它会自动更新吗? - Do GAS add-on update automatically when I update it on G-Suite marketplace? 我发布了一个 Google 表格插件,但它没有出现在 G Suite 市场列表中 - I published a Google Sheets add-on, but it's not appearing in the G Suite Marketplace list 通过 G-Suite Marketplace SDK 发布时不会创建附加菜单,但会通过 Chrome 网上应用店创建 - Add-on menu doesn't get created when published through G-Suite Marketplace SDK, but does through Chrome Web Store 如何为在 Apps 脚本上运行的 G Suite 插件获取 OAuth 刷新令牌? - How can I obtain an OAuth refresh token for a G Suite Add-on running on Apps Script? 错误消息“您必须配置 G Suite Marketplace SDK 才能发布插件。” 当 SDK 正确配置时 - Error message "You must configure the G Suite Marketplace SDK to publish an add-on." when SDK is correctly configured G Suite Add-on 拒绝连接到驱动器? 如何解决“drive.google.com 拒绝连接”错误? - G Suite Add-on refusing to connect to drive? How to solve “drive.google.com refused to connect” error? 发布 G Suite 插件:部署包含空主机列表 - Publish G Suite Add-on: Deployment contains an empty host list 使用G suite插件向gmail消息添加图标 - Adding an icon to a gmail message using G suite add-on
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM