简体   繁体   English

通过API共享Outlook日历

[英]Share Outlook Calendar via API

I need to share the main microsoft outlook calendar of my user with another Outlook user programatically, via an API. 我需要通过API以编程方式与另一个Outlook用户共享我的用户的主要microsoft outlook日历。

I managed to integrate Oauth2 authorization with the correct scopes ( wl.calendars_update ) to access calendar. 我设法将Oauth2授权与正确的范围( wl.calendars_update )集成以访问日历。

Based on the Outlook Calendar REST API reference I could successfully retrieve the user's calendars from https://outlook.office.com/api/v2.0/me/calendars . 基于Outlook Calendar REST API参考,我可以从https://outlook.office.com/api/v2.0/me/calendars成功检索用户的日历。 But what we want is to share a calendar via an API. 但我们想要的是通过API共享日历。 Is this possible? 这可能吗?

For comparison google does this via ACL s. 为了比较谷歌通过ACL做到这一点。 And the code required for sharing is smth like this below: 分享所需的代码如下所示:

const headers = { Authorization: `Bearer ${req.pre.user.microsoftAccessToken}` };
    const params = { scope: { type: 'user', value: google.calendar.mail }, role: 'freeBusyReader' };

    return rp.post(`${google.calendar.apiUrl}/primary/acl`, { json: true, body: params, headers })
      .then(() => res({ message: req.i18n.__('shareCalendarSuccess') }))
      .catch(err => res(normalizeErr(err)));

I think it is impossible for now. 我认为现在是不可能的。

It seems Outlook.com REST API is very recent: Outlook.com REST API似乎是最近的:

I need this feature too and I've written a feature request on Microsoft UserVoice: Allow to modify calendars share/ACL/permissions using Outlook.com REST API 我也需要这个功能,我在Microsoft UserVoice上写了一个功能请求: 允许使用Outlook.com REST API修改日历共享/ ACL /权限

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM