event: acceptevent: accept

接受用户日历中的指定事件Accept the specified event in a user calendar.


要调用此 API,需要以下权限之一。要了解详细信息,包括如何选择权限的信息,请参阅权限One of the following permissions is required to call this API. To learn more, including how to choose permissions, see Permissions.

权限类型Permission type 权限(从最低特权到最高特权)Permissions (from least to most privileged)
委派(工作或学校帐户)Delegated (work or school account) Calendars.ReadWriteCalendars.ReadWrite
委派(个人 Microsoft 帐户)Delegated (personal Microsoft account) Calendars.ReadWriteCalendars.ReadWrite
应用程序Application Calendars.ReadWriteCalendars.ReadWrite

HTTP 请求HTTP request

POST /me/events/{id}/accept
POST /users/{id | userPrincipalName}/events/{id}/accept

POST /me/calendar/events/{id}/accept
POST /users/{id | userPrincipalName}/calendar/events/{id}/accept

POST /me/calendars/{id}/events/{id}/accept
POST /users/{id | userPrincipalName}/calendars/{id}/events/{id}/accept

POST /me/calendargroup/calendars/{id}/events/{id}/accept
POST /users/{id | userPrincipalName}/calendargroup/calendars/{id}/events/{id}/accept

POST /me/calendargroups/{id}/calendars/{id}/events/{id}/accept
POST /users/{id | userPrincipalName}/calendargroups/{id}/calendars/{id}/events/{id}/accept

请求标头Request headers

名称Name 类型Type 说明Description
AuthorizationAuthorization stringstring Bearer {token}。必需。Bearer {token}. Required.
Content-TypeContent-Type stringstring 实体正文中的数据性质。必需。Nature of the data in the body of an entity. Required.

请求正文Request body

在请求正文中,提供具有以下参数的 JSON 对象。In the request body, provide a JSON object with the following parameters.

参数Parameter 类型Type 说明Description
注释comment StringString 响应中包含的文本。可选。Text included in the response. Optional.
sendResponsesendResponse BooleanBoolean 如果将响应发送给组织者,则值为 true;否则为 false。可选。默认值为 truetrue if a response is to be sent to the organizer; otherwise, false. Optional. Default is true.


如果成功,此方法返回 202 Accepted 响应代码。它不在响应正文中返回任何内容。If successful, this method returns 202 Accepted response code. It does not return anything in the response body.


下面是一个如何调用此 API 的示例。Here is an example of how to call this API.


下面是一个请求示例。Here is an example of the request.

POST https://graph.microsoft.com/v1.0/me/events/{id}/accept
Content-type: application/json
Content-length: 56

  "comment": "comment-value",
  "sendResponse": true

下面是一个响应示例。Here is an example of the response.

HTTP/1.1 200 OK