--- title: "Calendar API" type: concept tags: [google-workspace, api, calendar] --- ## Definition Calendar API 是 Google 提供的编程接口,允许第三方应用程序通过 OAuth 2.0 认证访问 Google Calendar 日历服务,实现事件查询、创建、修改和删除等功能。 ## Key Operations | 操作 | 描述 | |------|------| | events.list | 列出日历事件 | | events.get | 获取事件详情 | | events.insert | 创建日历事件 | | events.patch | 部分更新事件 | | events.delete | 删除事件 | | colors.get | 获取颜色配置 | ## Prerequisites for Access 1. **Google Cloud Console** 中启用 Calendar API 2. 配置 **OAuth 2.0 凭证**(桌面应用类型) 3. 用户完成 OAuth 授权流程 4. 添加**测试用户**(未验证应用场景) ## Common Error - `403 accessNotConfigured`:API 未启用 - `403 accessDenied`:OAuth 未授权 ## Related Concepts - [[OAuth]]:认证机制 - [[Google-Cloud-Console]]:凭证配置 - [[测试用户]]:绕过未验证应用限制 - [[API-Enablement]]:启用 API 的操作 ## Related Entities - [[Google]]:API 提供方 - [[gog CLI]]:使用 Calendar API 的命令行工具