Skip to content
Bitzsoft.Integrationsbitzsoft.integrations

Reference

飞书 VideoConference

飞书视频会议服务——AppId + AppSecret 换取 tenant_access_token 鉴权。

Last updated

基于飞书开放平台视频会议(vc)API 实现,采用 AppId + AppSecret 换取 tenant_access_token 鉴权,内置令牌缓存与自动刷新。

包信息

  • NuGet 包:Bitzsoft.Integrations.VideoConference.Feishu
  • 接口:IVideoConferenceService
  • 鉴权:AppId + AppSecret 换 tenant_access_token(Bearer 头注入)
  • Provider ID:feishu

配置

字段类型必填默认值说明
AppIdstring应用 ID(AppId)
AppSecretstring应用密钥(AppSecret)
DefaultOwnerIdstring?默认会议主持人(飞书 VC 创建会议 owner_id 必填)
BaseUrlstringhttps://open.feishu.cn飞书开放平台 API 基地址
HttpClientNamestringVideoConferenceFeishu业务 HttpClient 命名
TokenHttpClientNamestringVideoConferenceFeishuToken令牌刷新专用 HttpClient 命名
{
"VideoConference": {
"Feishu": {
"AppId": "your-app-id",
"AppSecret": "your-app-secret",
"DefaultOwnerId": "ou_your-owner-id"
}
}
}

注册

// 方式一:IConfiguration(默认读取 "VideoConference:Feishu" 配置节)
services.AddFeishuVideoConference(configuration);
// 方式二:委托配置
services.AddFeishuVideoConference(options =>
{
options.AppId = "your-app-id";
options.AppSecret = "your-app-secret";
options.DefaultOwnerId = "ou_your-owner-id";
});

使用示例

var meeting = await service.CreateMeetingAsync(new CreateMeetingRequest
{
Subject = "产品设计评审",
StartTime = DateTimeOffset.Parse("2026-08-04T10:00:00+08:00"),
EndTime = DateTimeOffset.Parse("2026-08-04T11:30:00+08:00"),
});
// 邀请参会人
await service.InviteAttendeesAsync(new InviteAttendeesRequest
{
MeetingId = meeting.MeetingId,
Attendees = [new() { Email = "colleague@example.com" }]
});
// 查询录制
var recordings = await service.ListRecordingsAsync(meeting.MeetingId);

鉴权机制

  • 令牌获取:POST /open-apis/auth/v3/tenant_access_token/internal,JSON body 含 AppId 和 AppSecret。
  • 令牌缓存:FeishuVideoConferenceTokenManager 为 Singleton,过期前 5 分钟刷新。
  • 业务请求:按请求注入 Authorization: Bearer {tenant_access_token} 头。
  • 失效码 99991661/99991663/99991664 触发自愈。

已知限制

飞书 VC 创建会议要求 owner_id 必填,请求未显式指定时回退到 DefaultOwnerId。本项目自包含令牌管理,不依赖 TeamWork.Feishu。

100%

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