【问题标题】:Sharing a calendar, acl.insert() now requires the user manual add it via the email notification共享日历,acl.insert() 现在需要用户手册通过电子邮件通知添加它
【发布时间】:2023-04-06 00:25:02
【问题描述】:

为了让我们的用户能够在 Google 日历中查看我们的日历,我们目前在自己的服务帐户上创建了一个日历,然后使用 ACL 与用户共享此日历。

过去,新日历会自动显示在用户帐户的“其他日历”下。他们会收到来自 Google 的电子邮件通知,其中包含“我们已自动将此日历添加到您的 Google 日历帐户。您可以随时隐藏或完全删除此日历。”

但是,日历突然没有显示在他们的帐户中。最终我注意到通知电子邮件现在显示:“将此日历添加到您的其他日历后,您可以随时隐藏或完全删除它。”带有链接“添加此日历.”

只有在点击此链接后,日历才会出现在他们的帐户中。

这是 Google 突然改变政策吗?有没有办法避免这第二步?

这是一些示例代码。我们启用并验证的范围是“.../auth/calendar”、“email”、“profile”、“openid”。

calendar = service.calendars().insert(body={
                'description':      description,
                'summary':          summary,
                'timeZone':         timezone,
            }).execute()

service.acl().insert(
    calendarId = calendar['id'],
    body={
        'role':     'reader',
        'scope':    {
            'type':     'user',
            'value':    user_email,
        }
    }).execute()

【问题讨论】:

    标签: google-calendar-api


    【解决方案1】:

    很遗憾,对于您关于避免第二步的问题,我们无能为力。即使 Google 方面的政策发生了变化,您也无法更改任何内容,因为所有日历 API 都托管在它们的服务器上。

    一个建议是实现一个模拟点击Add this calendar 的应用程序,这将使您的问题变得更容易一些。

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 2018-04-23
      • 2023-04-04
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2019-03-16
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多