gpt4 book ai didi

google-drive-api - "The domain policy has disabled third-party Drive apps"

转载 作者:行者123 更新时间:2023-12-01 23:02:47 30 4
gpt4 key购买 nike

对于某些域,我们的应用程序不起作用。我检查了他们的 Google Apps 域配置并启用了 Google Drive。
有任何想法吗?

com.google.api.client.googleapis.json.GoogleJsonResponseException: 403 OK
{
"code" : 403,
"errors" : [ {
"domain" : "global",
"location" : "Authorization",
"locationType" : "header",
"message" : "The domain policy has disabled third-party Drive apps",
"reason" : "domainPolicy"
} ],
"message" : "The domain policy has disabled third-party Drive apps"
}
at com.google.api.client.googleapis.json.GoogleJsonResponseException.from(GoogleJsonResponseException.java:143)
at com.google.api.client.googleapis.json.GoogleJsonResponseException.execute(GoogleJsonResponseException.java:187)
at com.google.api.client.googleapis.services.GoogleClient.executeUnparsed(GoogleClient.java:279)
at com.google.api.client.http.json.JsonHttpRequest.executeUnparsed(JsonHttpRequest.java:207)
at com.google.api.services.drive.Drive$Files$Insert.executeUnparsed(Drive.java:307)
at com.google.api.services.drive.Drive$Files$Insert.execute(Drive.java:331)

最佳答案

即使为用户启用了 Google Drive 服务,管理员也可以限制用户安装 Google Drive 应用程序或使用 Google Drive API,方法是转到应用程序 > Google Apps > Drive 设置,然后取消选中“允许用户安装 Google Drive 应用程序” ”在“数据访问”菜单中。

您看到的错误消息表明这些域没有选中“允许用户安装 Google 云端硬盘应用程序”。您的应用程序应通过向用户提供以下信息来处理此错误:
Sorry, you cannot use this application because your administrator has disabled 3rd party Google Drive apps. Please ask your administrator to allow Google Drive apps by opening the Google Apps control panel and going to Apps > Google Apps > Settings for Drive and making sure "Allow users to install Google Drive apps" in the "Data Access" menu is enabled.

关于google-drive-api - "The domain policy has disabled third-party Drive apps",我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/14499333/

30 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com