【发布时间】:2021-03-03 04:10:37
【问题描述】:
我们有一个用于 Google 表格的插件,并希望切换其他 Google 帐户以使用某些功能。
半年前,我成功地将一个 URL (https://***.googleusercontent.com) 添加到 Authorized JavaScript origins 和一个 URL (https://oauth-redirect.googleusercontent.com/r/\*\*\*) 到 授权的重定向 URIs.
但现在我们不能,因此它一直显示
授权错误(错误:400:redirect_uri_mismatch)。
当我尝试添加此 URL (https://***.googleusercontent.com) 时,它会显示
“保存失败!请求失败,因为资源的其中一个字段无效。”
我不知道规则是否改变了,我该怎么办。有关详细信息,请参阅屏幕截图。谢谢!
错误消息:请求中的 JavaScript 源 https://***.googleusercontent.com 与授权给 OAuth 客户端的源不匹配。
【问题讨论】:
-
When I try to add this URL(https://***.googleusercontent.com), it shows "Save failed! The request failed because one of the field of the resource is invalid."要清楚,https://***.googleusercontent.com中的***是实际的 ascii 字符。对吗? -
是的,像这样:
https://n-kcfn2rzfaub2x2qhuzyqgl5wawaisnsrtij6ooi-2lu-script.googleusercontent.com -
这是否与之前(并成功)添加的 URL 相同?还是你想添加第二个 JS 源?
-
我们有一个新的插件,所以 URL 不同。但我也尝试将相同的 URL 添加到新插件的 OAuth 2.0 客户端 ID 并为旧插件添加第二个 URL。两个都失败了。
标签: google-apps-script google-sheets google-cloud-platform add-on http-status-code-400