【问题标题】:Google Calendar API - no invites sent out during insert + event not visible in non-gmail-accountGoogle Calendar API - 在插入 + 事件期间未发送邀请在非 Gmail 帐户中不可见
【发布时间】:2020-04-18 07:23:38
【问题描述】:

我目前正在从 google-calendar-api (api reference) 实现插入功能,但在成功创建事件后,它永远不会出现在非 gmail 帐户上(例如 ...@icloud. com)。在使用 api-explorer 进行测试时也是如此。它只会默默地出现在 gmail-accounts 中。

我已将 sendNotifications 设置为 true 并将 sendUpdates 设置为 all。没有发出邀请,是的,我检查了垃圾邮件目录。我已经在这个问题上坐了几天了,这让我难以置信,这不起作用。该服务目前无法使用,因为我无法使用非 gmail 地址添加与会者。

我一直在关注文档,尝试了 api-explorer,还测试了 node.js-library 以及普通的 http-requests。

如前所述,邀请/非 gmail 帐户甚至无法与 api-explorer 一起使用。如何修复此错误?


编辑 1: Typescript中调用相应api的函数。 oAuth2Client 被正确初始化。 googleapis 是版本 48.0.0。开始和结束时间是格式正确的字符串,因为事件已成功创建但没有通知。

export async function createGoogleCalendarEntry(
  uid: string,
  props: CreateGoogleCalendarEntryProps,
  context: CallableContext
): Promise<CreateCalendarEntryRes<CreateGoogleCalendarEntryRes>> {
  const { title, start, end, attendees, desc } = props;

  const oAuth2Client = await getAuthnAuthzGcpOAuth2ClientFromCallableContext(uid, context, c => c.gcp!);

  return google
    .calendar({ version: "v3", auth: oAuth2Client })
    .events.insert({
      calendarId: "primary",
      sendUpdates: "all",
      sendNotifications: true,
      requestBody: {
        summary: title,
        description: desc,
        start: { dateTime: start },
        end: { dateTime: end },
        attendees: attendees.map(a => ({ email: a.mail }))
      }
    })
    .then(res => ({
      provider: "google",
      externalCalId: res.data.id!,
      meta: res.data as CreateGoogleCalendarEntryRes
    }));
}

【问题讨论】:

  • 请分享您的代码。
  • 您好 Rafa,感谢您查看我的问题。我已经更新了帖子以包含代码。

标签: google-calendar-api google-apis-explorer


【解决方案1】:

这似乎是一个错误!

我使用Calendars: Events.insert Try this API 功能对此进行了测试,并且能够复制它,因此我查看了 Google 的问题跟踪器,并且已经有一份报告详细说明了相同的行为:

Google 似乎确实知道这个问题,但如果它引起问题,您可以提交自己的错误 here

您也可以点击上述页面左上角问题编号旁边的 ☆,让 Google 知道更多人遇到此问题,因此更有可能更快地被看到。

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2021-02-01
    相关资源
    最近更新 更多