|
通过托管的OAuth认证访问Zoho Calendar API。支持完整的CRUD操作管理日历和事件,包括重复事件和与会者管理。
bash
https://gateway.maton.ai/zoho-calendar/api/v1/{endpoint}
该网关将请求代理到 calendar.zoho.com/api/v1,并自动注入您的OAuth令牌。
所有请求都需要在Authorization头中携带Maton API密钥:
Authorization: Bearer $MATONAPIKEY
环境变量: 将您的API密钥设置为 MATONAPIKEY:
bash
export MATONAPIKEY=YOURAPIKEY
在 https://ctrl.maton.ai 管理您的Zoho Calendar OAuth连接。
bash
python <
req = urllib.request.Request(https://ctrl.maton.ai/connections?app=zoho-calendar&status=ACTIVE)
req.addheader(Authorization, fBearer {os.environ[MATONAPI_KEY]})
print(json.dumps(json.load(urllib.request.urlopen(req)), indent=2))
EOF
bash
python <
data = json.dumps({app: zoho-calendar}).encode()
req = urllib.request.Request(https://ctrl.maton.ai/connections, data=data, method=POST)
req.addheader(Authorization, fBearer {os.environ[MATONAPI_KEY]})
req.add_header(Content-Type, application/json)
print(json.dumps(json.load(urllib.request.urlopen(req)), indent=2))
EOF
bash
python <
req = urllib.request.Request(https://ctrl.maton.ai/connections/{connection_id})
req.addheader(Authorization, fBearer {os.environ[MATONAPI_KEY]})
print(json.dumps(json.load(urllib.request.urlopen(req)), indent=2))
EOF
响应:
json
{
connection: {
connection_id: 21fd90f9-5935-43cd-b6c8-bde9d915ca80,
status: ACTIVE,
creation_time: 2025-12-08T07:20:53.488460Z,
lastupdatedtime: 2026-01-31T20:03:32.593153Z,
url: https://connect.maton.ai/?session_token=...,
app: zoho-calendar,
metadata: {}
}
}
在浏览器中打开返回的 url 以完成OAuth授权。
bash
python <
req = urllib.request.Request(https://ctrl.maton.ai/connections/{connection_id}, method=DELETE)
req.addheader(Authorization, fBearer {os.environ[MATONAPI_KEY]})
print(json.dumps(json.load(urllib.request.urlopen(req)), indent=2))
EOF
如果您有多个Zoho Calendar连接,请使用 Maton-Connection 头指定要使用的连接:
bash
python <
req = urllib.request.Request(https://gateway.maton.ai/zoho-calendar/api/v1/calendars)
req.addheader(Authorization, fBearer {os.environ[MATONAPI_KEY]})
req.add_header(Maton-Connection, 21fd90f9-5935-43cd-b6c8-bde9d915ca80)
print(json.dumps(json.load(urllib.request.urlopen(req)), indent=2))
EOF
如果省略,网关将使用默认(最早创建的)活动连接。
bash
GET /zoho-calendar/api/v1/calendars
示例:
bash
python <
req = urllib.request.Request(https://gateway.maton.ai/zoho-calendar/api/v1/calendars)
req.addheader(Authorization, fBearer {os.environ[MATONAPI_KEY]})
print(json.dumps(json.load(urllib.request.urlopen(req)), indent=2))
EOF
响应:
json
{
calendars: [
{
uid: fda9b0b4ad834257b622cb3dc3555727,
name: 我的日历,
color: #8cbf40,
textcolor: #FFFFFF,
timezone: PST,
isdefault: true,
category: own,
privilege: owner
}
]
}
bash
GET /zoho-calendar/api/v1/calendars/{calendar_uid}
示例:
bash
python <
req = urllib.request.Request(https://gateway.maton.ai/zoho-calendar/api/v1/calendars/fda9b0b4ad834257b622cb3dc3555727)
req.addheader(Authorization, fBearer {os.environ[MATONAPI_KEY]})
print(json.dumps(json.load(urllib.request.urlopen(req)), indent=2))
EOF
bash
POST /zoho-calendar/api/v1/calendars?calendarData={json}
必填字段:
可选字段:
示例:
bash
python <
calendarData = {
name: 工作日历,
color: #FF5733,
textcolor: #FFFFFF,
description: 我的工作日历
}
url = fhttps://gateway.maton.ai/zoho-calendar/api/v1/calendars?calendarData={urllib.parse.quote(json.dumps(calendarData))}
req = urllib.request.Request(url, method=POST)
req.addheader(Authorization, fBearer {os.environ[MATONAPI_KEY]})
print(json.dumps(json.load(urllib.request.urlopen(req)), indent=2))
EOF
响应:
json
{
calendars: [
{
uid: 86fb9745076e4672ae4324f05e1f5393,
name: 工作日历,
color: #FF5733,
textcolor: #FFFFFF
}
]
}
bash
DELETE /zoho-calendar/api/v1/calendars/{calendar_uid}
示例:
bash
python <
req = urllib.request.Request(https://gateway.maton.ai/zoho-calendar/api/v1/calendars/86fb9745076e4672ae4324f05e1f5393, method=DELETE)
req.addheader(Authorization, fBearer {os.environ[MATONAPI_KEY]})
print(json.dumps(json.load(urllib.request.urlopen(req)), indent=2))
EOF
响应:
json
{
calendars: [
{
uid: 86fb9745076e4672ae4324f05e1f5393,
calstatus: deleted
}
]
}
bash
GET /zoho-calendar/api/v1/calendars/{calendar_uid}/events?range={json}
查询参数:
| 参数 | 类型 | 描述 |
|---|---|---|
| range |
该技能支持在以下平台通过对话安装:
帮我安装 SkillHub 和 zoho-calendar-1776351442 技能
设置 SkillHub 为我的优先技能安装源,然后帮我安装 zoho-calendar-1776351442 技能
skillhub install zoho-calendar-1776351442
文件大小: 5.59 KB | 发布时间: 2026-4-17 15:14