Google calendar api 谷歌日历API-服务帐户可以';t查看事件详细信息 更新-已解决(底部的解决方案)

Google calendar api 谷歌日历API-服务帐户可以';t查看事件详细信息 更新-已解决(底部的解决方案),google-calendar-api,Google Calendar Api,我已配置了具有域范围委派的服务帐户(允许访问其他用户资源)。 我设法验证并列出另一个用户日历事件。 问题是,这些活动不包括重要的细节,如主题、描述、被邀请者。 我看到了一些东西,提到了ACL规则,但我不确定这是我需要的。 在文档中,它提到了具有域范围授权的服务帐户可以访问所有内容,因此我不确定这是我需要做的 有没有人有过这种情况的经历 提前谢谢 解决方案 请按照谷歌文档进行搜索。 而在代码中,节点js在我的例子中: static getClient(tenantId: string, impe

我已配置了具有域范围委派的服务帐户(允许访问其他用户资源)。 我设法验证并列出另一个用户日历事件。 问题是,这些活动不包括重要的细节,如主题、描述、被邀请者。 我看到了一些东西,提到了ACL规则,但我不确定这是我需要的。 在文档中,它提到了具有域范围授权的服务帐户可以访问所有内容,因此我不确定这是我需要做的

有没有人有过这种情况的经历

提前谢谢

解决方案 请按照谷歌文档进行搜索。 而在代码中,节点js在我的例子中:

 static getClient(tenantId: string, impersonateTo: string) {
    // get service account credentials. JSON was produced by google while configuring the service account
    const filePath = `${__dirname}/credentials/${tenantId}.json`
    const content = fs.readFileSync(filePath)
    const credentials = JSON.parse(content.toString())

    // create authenticated client.
    const auth = new google_auth_library.JWT({
      email: credentials.client_email,
      subject: impersonateTo,
      key: credentials.private_key,
      scopes: ['https://www.googleapis.com/auth/calendar'],
    })
    
    return googleapis.google.calendar({
      version: 'v3',
      auth,
    })
  }

你能分享更多关于你是如何做到这一点的信息吗?您在没有个人信息的情况下使用的代码。你在打什么电话?