【问题标题】:Google G Suite Business Reports API configurationGoogle G Suite 业务报告 API 配置
【发布时间】:2019-02-04 10:50:42
【问题描述】:

我正在尝试配置 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."
  }
}

【问题讨论】:

  • 如果您还没有完成,可以尝试按照SO post 中的说明拨打.setServiceAccountUser("admins email address")
  • 感谢您的回复!必须在 OAuth 请求中设置?
  • 谢谢!现在可以了!
  • 我已经发布了我的答案

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


【解决方案1】:

如果您还没有这样做,您可以尝试按照SO post 中的说明拨打.setServiceAccountUser("admins email address")

【讨论】:

    猜你喜欢
    • 2011-07-20
    • 2019-08-16
    • 1970-01-01
    • 2019-10-07
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2020-03-11
    相关资源
    最近更新 更多