Skip to content
Bitzsoft.Integrationsbitzsoft.integrations

Reference

Zoom VideoConference

Zoom 视频会议服务——Server-to-Server OAuth 令牌模式。

Last updated

基于 Zoom REST API 实现,采用 Server-to-Server OAuth 令牌模式,内置令牌缓存与自动刷新。

包信息

  • NuGet 包:Bitzsoft.Integrations.VideoConference.Zoom
  • 接口:IVideoConferenceService
  • 鉴权:Server-to-Server OAuth(AccountId + ClientId + ClientSecret)
  • Provider ID:zoom

配置

字段类型必填默认值说明
AccountIdstring账户 ID(Account ID)
ClientIdstring应用 ID(Client Id)
ClientSecretstring应用密钥(Client Secret)
BaseUrlstringhttps://api.zoom.usZoom REST API 基地址
OAuthBaseUrlstringhttps://zoom.usServer-to-Server OAuth 令牌端点基地址
HttpClientNamestringVideoConferenceZoom业务 HttpClient 命名
TokenHttpClientNamestringVideoConferenceZoomToken令牌刷新专用 HttpClient 命名
{
"VideoConference": {
"Zoom": {
"AccountId": "your-account-id",
"ClientId": "your-client-id",
"ClientSecret": "your-client-secret"
}
}
}

注册

// 方式一:IConfiguration(默认读取 "VideoConference:Zoom" 配置节)
services.AddZoomVideoConference(configuration);
// 方式二:委托配置
services.AddZoomVideoConference(options =>
{
options.AccountId = "your-account-id";
options.ClientId = "your-client-id";
options.ClientSecret = "your-client-secret";
});

使用示例

var meeting = await service.CreateMeetingAsync(new CreateMeetingRequest
{
Subject = "Sprint Planning",
StartTime = DateTimeOffset.Parse("2026-08-03T14:00:00Z"),
EndTime = DateTimeOffset.Parse("2026-08-03T15:00:00Z"),
Attendees = [new() { Email = "dev@example.com" }]
});
// 更新会议
await service.UpdateMeetingAsync(new UpdateMeetingRequest
{
MeetingId = meeting.MeetingId,
Subject = "Sprint Planning (Updated)"
});
// 查询录制
var recordings = await service.ListRecordingsAsync(meeting.MeetingId);

鉴权机制

  • 令牌获取:POST /oauth/token,HTTP Basic Auth(ClientId:ClientSecret),grant_type=account_credentialsaccount_id 参数。
  • 令牌缓存:ZoomTokenManager 为 Singleton,过期前 5 分钟刷新。
  • 业务请求:按请求注入 Authorization: Bearer {token} 头。
  • HTTP 401 Unauthorized 触发令牌失效自愈。

已知限制

所有供应商标记为 Preview。Zoom 时间格式为 ISO 8601。

100%

滚轮或按钮缩放 · 放大后拖动画面 · 双击切换 100% / 200%