[英]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脚步
appsscript.json
appsscript.json
的清单文件oauthScopes
field in a json file.oauthScopes
字段。 If it's not there then add it
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.