# 获取日历列表

基于当前用户身份获取日历列表

# 请求

基本
HTTP URL https://hi-gw.weizhipin.com/open-apis/calendar/v2/calendars
HTTP Method GET
支持的应用类型 自建应用
权限要求 获取日历、日程及闲忙信息

# 请求头

名称 类型 必填 描述
Authorization string tenant_access_token

user_access_token
值格式:"Bearer access_token"
示例值:"Bearer u-7f1bcd13fc57d46bac21793a18e560"

# 查询参数

名称 类型 描述
user_id_type string 用户 ID 类型示例值:"open_id"
可选值有:
open_id:用户的 open id
union_id:用户的 union id
user_id:用户的 user id
默认值:open_id
当值为 user_id,字段权限要求:
获取用户 user ID
user_id string 用户ID,需要与查询参数中的user_id_type类型保持一致。
示例值:"ou_7dab8a3d3cdcc9da365777c7ad535d62"

# 响应

# 响应体

名称 类型 描述
code int 错误码,非 0 表示失败
msg string 错误描述
data list -
 ∟calendar_id string 日历ID。
 ∟summary string 日历标题
 ∟permissions string 日历公开范围
可选值有
* private:私密
* show_busy:对他人展示忙碌
 ∟type string 日历类型
可选值有
* primary:用户的主日历
* third:第三方日历
* custom:自定义日历
 ∟role string 当前身份对于该日历的访问权限
可选值有
* owner:所有者
 ∟owner string 日历所有人

# 响应体示例

{
    "code": 0,
    "traceId": "_Ao59UOIBLPCeAAu",
    "data": [
        {
            "calendar_id": "ce5168c91d31723cwi-L3A~~",
            "summary": "xxx的日程",
            "type": "primary",
            "permissions": "show_busy",
            "role": "owner",
            "owner": "10001"
        },
        {
            "calendar_id": "4fafe17d2248ff13wi-I1A~~",
            "summary": "外部导入的日程",
            "type": "third",
            "permissions": "show_busy",
            "role": "owner",
            "owner": "10002"
        }
    ],
    "msg": "操作成功"
}
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
最后更新于 : 8/21/2023, 4:57:10 PM