public class Calendar extends Object
| 限定符和类型 | 方法和说明 |
|---|---|
CreateCalendarResp |
create(CreateCalendarReq req)
创建共享日历,调用该接口为当前身份(应用或用户)创建一个共享日历。
|
CreateCalendarResp |
create(CreateCalendarReq req,
RequestOptions reqOptions)
创建共享日历,调用该接口为当前身份(应用或用户)创建一个共享日历。
|
DeleteCalendarResp |
delete(DeleteCalendarReq req)
删除共享日历,调用该接口以当前身份(应用或用户)删除某一指定的共享日历。
|
DeleteCalendarResp |
delete(DeleteCalendarReq req,
RequestOptions reqOptions)
删除共享日历,调用该接口以当前身份(应用或用户)删除某一指定的共享日历。
|
GetCalendarResp |
get(GetCalendarReq req)
查询日历信息,调用该接口以当前身份(应用或用户)查询指定日历的信息。
|
GetCalendarResp |
get(GetCalendarReq req,
RequestOptions reqOptions)
查询日历信息,调用该接口以当前身份(应用或用户)查询指定日历的信息。
|
ListCalendarResp |
list(ListCalendarReq req)
查询日历列表,调用该接口分页查询当前身份(应用或用户)的日历列表。
|
ListCalendarResp |
list(ListCalendarReq req,
RequestOptions reqOptions)
查询日历列表,调用该接口分页查询当前身份(应用或用户)的日历列表。
|
MgetCalendarResp |
mget(MgetCalendarReq req)
批量查询日历信息,调用该接口批量查询指定日历的标题、描述、公开范围等信息。
|
MgetCalendarResp |
mget(MgetCalendarReq req,
RequestOptions reqOptions)
批量查询日历信息,调用该接口批量查询指定日历的标题、描述、公开范围等信息。
|
PatchCalendarResp |
patch(PatchCalendarReq req)
更新日历信息,调用该接口以当前身份(应用或用户)修改指定日历的标题、描述、公开范围等信息。
|
PatchCalendarResp |
patch(PatchCalendarReq req,
RequestOptions reqOptions)
更新日历信息,调用该接口以当前身份(应用或用户)修改指定日历的标题、描述、公开范围等信息。
|
PrimaryCalendarResp |
primary(PrimaryCalendarReq req)
查询主日历信息,调用该接口获取当前身份(应用或用户)的主日历信息。
|
PrimaryCalendarResp |
primary(PrimaryCalendarReq req,
RequestOptions reqOptions)
查询主日历信息,调用该接口获取当前身份(应用或用户)的主日历信息。
|
PrimarysCalendarResp |
primarys(PrimarysCalendarReq req)
批量获取主日历信息,根据user id列表批量查询指定用户的主日历信息。
|
PrimarysCalendarResp |
primarys(PrimarysCalendarReq req,
RequestOptions reqOptions)
批量获取主日历信息,根据user id列表批量查询指定用户的主日历信息。
|
SearchCalendarResp |
search(SearchCalendarReq req)
搜索日历,调用该接口通过关键字搜索日历,搜索结果为标题或描述包含关键字的公共日历或用户主日历。
|
SearchCalendarResp |
search(SearchCalendarReq req,
RequestOptions reqOptions)
搜索日历,调用该接口通过关键字搜索日历,搜索结果为标题或描述包含关键字的公共日历或用户主日历。
|
SubscribeCalendarResp |
subscribe(SubscribeCalendarReq req)
订阅日历,调用该接口以当前身份(应用或用户)订阅指定的日历。
|
SubscribeCalendarResp |
subscribe(SubscribeCalendarReq req,
RequestOptions reqOptions)
订阅日历,调用该接口以当前身份(应用或用户)订阅指定的日历。
|
SubscriptionCalendarResp |
subscription()
订阅日历变更事件,调用该接口为当前用户身份订阅[日历变更事件](https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/calendar-v4/calendar/events/changed)。
|
SubscriptionCalendarResp |
subscription(RequestOptions reqOptions)
订阅日历变更事件,调用该接口为当前用户身份订阅[日历变更事件](https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/calendar-v4/calendar/events/changed)。
|
UnsubscribeCalendarResp |
unsubscribe(UnsubscribeCalendarReq req)
取消订阅日历,调用该接口以当前身份(应用或用户)取消指定日历的订阅状态。
|
UnsubscribeCalendarResp |
unsubscribe(UnsubscribeCalendarReq req,
RequestOptions reqOptions)
取消订阅日历,调用该接口以当前身份(应用或用户)取消指定日历的订阅状态。
|
UnsubscriptionCalendarResp |
unsubscription()
取消订阅日历变更事件,调用该接口为当前用户身份取消订阅[日历变更事件](https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/calendar-v4/calendar/events/changed)。
|
UnsubscriptionCalendarResp |
unsubscription(RequestOptions reqOptions)
取消订阅日历变更事件,调用该接口为当前用户身份取消订阅[日历变更事件](https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/calendar-v4/calendar/events/changed)。
|
public Calendar(Config config)
public CreateCalendarResp create(CreateCalendarReq req, RequestOptions reqOptions) throws Exception
- 当前身份由 Header Authorization 的 Token 类型决定。tenant_access_token 指应用身份,user_access_token 指用户身份。;- 如果使用应用身份调用该接口,则需要确保应用开启了[机器人能力](https://open.feishu.cn/document/uAjLw4CM/ugTN1YjL4UTN24CO1UjN/trouble-shooting/how-to-enable-bot-ability)。;- 调用该接口创建共享日历时,当前身份会自动订阅该日历。单个身份可订阅的日历数量上限为 1000。 ;
Exceptionpublic CreateCalendarResp create(CreateCalendarReq req) throws Exception
- 当前身份由 Header Authorization 的 Token 类型决定。tenant_access_token 指应用身份,user_access_token 指用户身份。;- 如果使用应用身份调用该接口,则需要确保应用开启了[机器人能力](https://open.feishu.cn/document/uAjLw4CM/ugTN1YjL4UTN24CO1UjN/trouble-shooting/how-to-enable-bot-ability)。;- 调用该接口创建共享日历时,当前身份会自动订阅该日历。单个身份可订阅的日历数量上限为 1000。 ;
Exceptionpublic DeleteCalendarResp delete(DeleteCalendarReq req, RequestOptions reqOptions) throws Exception
- 当前身份由 Header Authorization 的 Token 类型决定。tenant_access_token 指应用身份,user_access_token 指用户身份。;- 如果使用应用身份调用该接口,则需要确保应用开启了[机器人能力](https://open.feishu.cn/document/uAjLw4CM/ugTN1YjL4UTN24CO1UjN/trouble-shooting/how-to-enable-bot-ability)。;- 当前身份必须对日历有 owner 权限才可以删除。你可以调用[查询日历信息](https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/calendar-v4/calendar/get)接口,通过响应字段 role 查看当前身份对日历的权限。 ;
Exceptionpublic DeleteCalendarResp delete(DeleteCalendarReq req) throws Exception
- 当前身份由 Header Authorization 的 Token 类型决定。tenant_access_token 指应用身份,user_access_token 指用户身份。;- 如果使用应用身份调用该接口,则需要确保应用开启了[机器人能力](https://open.feishu.cn/document/uAjLw4CM/ugTN1YjL4UTN24CO1UjN/trouble-shooting/how-to-enable-bot-ability)。;- 当前身份必须对日历有 owner 权限才可以删除。你可以调用[查询日历信息](https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/calendar-v4/calendar/get)接口,通过响应字段 role 查看当前身份对日历的权限。 ;
Exceptionpublic GetCalendarResp get(GetCalendarReq req, RequestOptions reqOptions) throws Exception
- 当前身份由 Header Authorization 的 Token 类型决定。tenant_access_token 指应用身份,user_access_token 指用户身份。;- 使用应用身份调用该接口前,需要确保该应用开启了[机器人能力](https://open.feishu.cn/document/uAjLw4CM/ugTN1YjL4UTN24CO1UjN/trouble-shooting/how-to-enable-bot-ability)。;- 当前身份必须对日历有访问权限。 ;
Exceptionpublic GetCalendarResp get(GetCalendarReq req) throws Exception
- 当前身份由 Header Authorization 的 Token 类型决定。tenant_access_token 指应用身份,user_access_token 指用户身份。;- 使用应用身份调用该接口前,需要确保该应用开启了[机器人能力](https://open.feishu.cn/document/uAjLw4CM/ugTN1YjL4UTN24CO1UjN/trouble-shooting/how-to-enable-bot-ability)。;- 当前身份必须对日历有访问权限。 ;
Exceptionpublic ListCalendarResp list(ListCalendarReq req, RequestOptions reqOptions) throws Exception
- 当前身份由 Header Authorization 的 Token 类型决定。tenant_access_token 指应用身份,user_access_token 指用户身份。;- 如果使用应用身份调用该接口,则需要确保应用开启了[机器人能力](https://open.feishu.cn/document/uAjLw4CM/ugTN1YjL4UTN24CO1UjN/trouble-shooting/how-to-enable-bot-ability)。;- 调用该接口时,首先需要使用 page_token 分页查询存量的日历列表,然后再使用 sync_token 增量同步日历的变更数据。 ;
Exceptionpublic ListCalendarResp list(ListCalendarReq req) throws Exception
- 当前身份由 Header Authorization 的 Token 类型决定。tenant_access_token 指应用身份,user_access_token 指用户身份。;- 如果使用应用身份调用该接口,则需要确保应用开启了[机器人能力](https://open.feishu.cn/document/uAjLw4CM/ugTN1YjL4UTN24CO1UjN/trouble-shooting/how-to-enable-bot-ability)。;- 调用该接口时,首先需要使用 page_token 分页查询存量的日历列表,然后再使用 sync_token 增量同步日历的变更数据。 ;
Exceptionpublic MgetCalendarResp mget(MgetCalendarReq req, RequestOptions reqOptions) throws Exception
- 如果使用应用身份调用该接口,则需要确保应用开启了[机器人能力](https://open.feishu.cn/document/uAjLw4CM/ugTN1YjL4UTN24CO1UjN/trouble-shooting/how-to-enable-bot-ability)。;- 当前身份必须对日历有访问权限。 ;
Exceptionpublic MgetCalendarResp mget(MgetCalendarReq req) throws Exception
- 如果使用应用身份调用该接口,则需要确保应用开启了[机器人能力](https://open.feishu.cn/document/uAjLw4CM/ugTN1YjL4UTN24CO1UjN/trouble-shooting/how-to-enable-bot-ability)。;- 当前身份必须对日历有访问权限。 ;
Exceptionpublic PatchCalendarResp patch(PatchCalendarReq req, RequestOptions reqOptions) throws Exception
- 当前身份由 Header Authorization 的 Token 类型决定。tenant_access_token 指应用身份,user_access_token 指用户身份。;- 如果使用应用身份调用该接口,则需要确保应用开启了[机器人能力](https://open.feishu.cn/document/uAjLw4CM/ugTN1YjL4UTN24CO1UjN/trouble-shooting/how-to-enable-bot-ability)。;- 如果当前身份具有日历的 owner 访问权限,则可以更新日历的所有属性(包括全局生效的 summary、description、permission 和仅对当前身份生效的 color、summary_alias)。;- 如果当前身份不具有日历的 owner 访问权限,则只能更新对当前身份生效的 color、summary_alias。你可以调用[查询日历信息](https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/calendar-v4/calendar/get)接口,查看当前身份对日历的访问权限。;- 会议室日历不支持设置备注。 ;
Exceptionpublic PatchCalendarResp patch(PatchCalendarReq req) throws Exception
- 当前身份由 Header Authorization 的 Token 类型决定。tenant_access_token 指应用身份,user_access_token 指用户身份。;- 如果使用应用身份调用该接口,则需要确保应用开启了[机器人能力](https://open.feishu.cn/document/uAjLw4CM/ugTN1YjL4UTN24CO1UjN/trouble-shooting/how-to-enable-bot-ability)。;- 如果当前身份具有日历的 owner 访问权限,则可以更新日历的所有属性(包括全局生效的 summary、description、permission 和仅对当前身份生效的 color、summary_alias)。;- 如果当前身份不具有日历的 owner 访问权限,则只能更新对当前身份生效的 color、summary_alias。你可以调用[查询日历信息](https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/calendar-v4/calendar/get)接口,查看当前身份对日历的访问权限。;- 会议室日历不支持设置备注。 ;
Exceptionpublic PrimaryCalendarResp primary(PrimaryCalendarReq req, RequestOptions reqOptions) throws Exception
**说明**;;- 当前身份由 Header Authorization 的 Token 类型决定。tenant_access_token 指应用身份,user_access_token 指用户身份。;- 使用应用身份调用该接口前,需要确保该应用开启了[机器人能力](https://open.feishu.cn/document/uAjLw4CM/ugTN1YjL4UTN24CO1UjN/trouble-shooting/how-to-enable-bot-ability)。;- 使用应用身份调用该接口时,查询参数 user_id_type 不能设置为 user_id。你可以选择 open_id 或者 union_id,在返回结果中,user_id 参数值会包含应用机器人对应的 open_id 或 union_id。 ;
Exceptionpublic PrimaryCalendarResp primary(PrimaryCalendarReq req) throws Exception
**说明**;;- 当前身份由 Header Authorization 的 Token 类型决定。tenant_access_token 指应用身份,user_access_token 指用户身份。;- 使用应用身份调用该接口前,需要确保该应用开启了[机器人能力](https://open.feishu.cn/document/uAjLw4CM/ugTN1YjL4UTN24CO1UjN/trouble-shooting/how-to-enable-bot-ability)。;- 使用应用身份调用该接口时,查询参数 user_id_type 不能设置为 user_id。你可以选择 open_id 或者 union_id,在返回结果中,user_id 参数值会包含应用机器人对应的 open_id 或 union_id。 ;
Exceptionpublic PrimarysCalendarResp primarys(PrimarysCalendarReq req, RequestOptions reqOptions) throws Exception
Exceptionpublic PrimarysCalendarResp primarys(PrimarysCalendarReq req) throws Exception
Exceptionpublic SearchCalendarResp search(SearchCalendarReq req, RequestOptions reqOptions) throws Exception
- 如果使用应用身份调用该接口,则需要确保应用开启了[机器人能力](https://open.feishu.cn/document/uAjLw4CM/ugTN1YjL4UTN24CO1UjN/trouble-shooting/how-to-enable-bot-ability)。;- 应用身份不支持搜索用户主日历。 ;
Exceptionpublic SearchCalendarResp search(SearchCalendarReq req) throws Exception
- 如果使用应用身份调用该接口,则需要确保应用开启了[机器人能力](https://open.feishu.cn/document/uAjLw4CM/ugTN1YjL4UTN24CO1UjN/trouble-shooting/how-to-enable-bot-ability)。;- 应用身份不支持搜索用户主日历。 ;
Exceptionpublic SubscribeCalendarResp subscribe(SubscribeCalendarReq req, RequestOptions reqOptions) throws Exception
- 当前身份由 Header Authorization 的 Token 类型决定。tenant_access_token 指应用身份,user_access_token 指用户身份。;- 如果使用应用身份调用该接口,则需要确保应用开启了[机器人能力](https://open.feishu.cn/document/uAjLw4CM/ugTN1YjL4UTN24CO1UjN/trouble-shooting/how-to-enable-bot-ability)。;- 仅可订阅以下属性的日历,你可以调用[查询日历信息](https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/calendar-v4/calendar/get)接口,查看指定日历的属性。; - 日历类型(type)为 shared 或者 primary。; - 日历公开范围(permissions)为 public 或者 show_only_free_busy。;- 不允许订阅机器人的主日历。;- 当前身份可订阅的日历数量上限为 1000。 ;
Exceptionpublic SubscribeCalendarResp subscribe(SubscribeCalendarReq req) throws Exception
- 当前身份由 Header Authorization 的 Token 类型决定。tenant_access_token 指应用身份,user_access_token 指用户身份。;- 如果使用应用身份调用该接口,则需要确保应用开启了[机器人能力](https://open.feishu.cn/document/uAjLw4CM/ugTN1YjL4UTN24CO1UjN/trouble-shooting/how-to-enable-bot-ability)。;- 仅可订阅以下属性的日历,你可以调用[查询日历信息](https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/calendar-v4/calendar/get)接口,查看指定日历的属性。; - 日历类型(type)为 shared 或者 primary。; - 日历公开范围(permissions)为 public 或者 show_only_free_busy。;- 不允许订阅机器人的主日历。;- 当前身份可订阅的日历数量上限为 1000。 ;
Exceptionpublic SubscriptionCalendarResp subscription(RequestOptions reqOptions) throws Exception
Exceptionpublic SubscriptionCalendarResp subscription() throws Exception
Exceptionpublic UnsubscribeCalendarResp unsubscribe(UnsubscribeCalendarReq req, RequestOptions reqOptions) throws Exception
- 当前身份由 Header Authorization 的 Token 类型决定。tenant_access_token 指应用身份,user_access_token 指用户身份。;- 如果使用应用身份调用该接口,则需要确保应用开启了[机器人能力](https://open.feishu.cn/document/uAjLw4CM/ugTN1YjL4UTN24CO1UjN/trouble-shooting/how-to-enable-bot-ability)。;- 仅可操作已经被当前身份订阅的日历。 ;
Exceptionpublic UnsubscribeCalendarResp unsubscribe(UnsubscribeCalendarReq req) throws Exception
- 当前身份由 Header Authorization 的 Token 类型决定。tenant_access_token 指应用身份,user_access_token 指用户身份。;- 如果使用应用身份调用该接口,则需要确保应用开启了[机器人能力](https://open.feishu.cn/document/uAjLw4CM/ugTN1YjL4UTN24CO1UjN/trouble-shooting/how-to-enable-bot-ability)。;- 仅可操作已经被当前身份订阅的日历。 ;
Exceptionpublic UnsubscriptionCalendarResp unsubscription(RequestOptions reqOptions) throws Exception
Exceptionpublic UnsubscriptionCalendarResp unsubscription() throws Exception
ExceptionCopyright © 2026. All rights reserved.