【问题标题】:How to get aliased emails from Google Calendar API如何从 Google Calendar API 获取别名电子邮件
【发布时间】:2017-05-18 18:30:00
【问题描述】:

使用Google Calendar API,我可以使用GET https://www.googleapis.com/calendar/v3/calendars/calendarId/events/eventId获取所有活动参与者。

在我的日历活动中,我使用别名 team@mycompany.com 向整个团队组织发送电子邮件。不幸的是,我的日历活动返回别名,而不是单个电子邮件,如下所示:

"attendees": [
  {
   "email": "me@mycomapny.com",
   "self": true,
   "responseStatus": "accepted"
  },
  {
   "email": "team@mycomapny.com",      <-- Not what I want
   "displayName": "My Entire Company",
   "responseStatus": "needsAction"
  },
],

如何获取扩展的与会者列表,如下所示:

"attendees": [
  {
   "email": "me@mycomapny.com",
   "self": true,
   "responseStatus": "accepted"
  },
  {
   "email": "you@mycomapny.com",    <-- expanded email list
   "responseStatus": "needsAction"
  },
  {
   "email": "someoneelse@mycomapny.com",
   "responseStatus": "needsAction"
  },
  {
   "email": "manager@mycomapny.com",
   "responseStatus": "needsAction"
  },
  ... etc
],

【问题讨论】:

    标签: email google-api mailing-list google-calendar-api


    【解决方案1】:

    我使用别名 team@mycompany.com 向整个团队组织发送电子邮件。

    如果您将 team@mycompany.com 添加到活动中,那么这正是您要添加的内容。日历无法知道电子邮件是邮件列表。如果您希望列出每个人,那么您将不得不将每个人添加到事件中。 Google 日历只能返回您提供的信息。

    回答:创建事件时不要使用邮件列表添加每个用户。否则 Google 日历无法知道这是一个邮件列表。正如我所见,谷歌日历正在返回正确的数据。

    【讨论】:

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