Google G Suite商业报告API配置

时间:2018-08-29 15:18:46

标签: google-api google-drive-api google-admin-sdk google-reporting-api google-drive-team-drive

我正在尝试配置Google服务帐户(在开发人员控制台中)以在我的应用程序中使用它来获取Reports API。

我遇到错误-“访问被拒绝。您无权读取活动记录”。似乎与配置有关。

我在Google Developers Console中创建了新的项目和服务帐户。在管理控制台设置“管理API客户端访问”菜单中添加了客户端ID。

也许我错过了什么?

请帮助。

服务器响应为:

{
  "error": {
    "errors": [
      {
        "domain": "global",
        "reason": "authError",
        "message": "Access denied. You are not authorized to read activity records.",
        "locationType": "header",
        "location": "Authorization"
      }
    ],
    "code": 401,
    "message": "Access denied. You are not authorized to read activity records."
  }
}

1 个答案:

答案 0 :(得分:1)

如果尚未完成,您可以尝试按照此SO post所述致电.setServiceAccountUser("admins email address")

相关问题