Skip to content
Bitzsoft.Integrationsbitzsoft.integrations

Reference

腾讯会议 VideoConference

腾讯会议视频会议服务——OAuth2 Client Credentials 令牌模式。

Last updated

基于腾讯会议 REST API 实现,采用 OAuth2 Client Credentials 令牌模式,内置令牌缓存与自动刷新。

包信息

  • NuGet 包:Bitzsoft.Integrations.VideoConference.TencentMeeting
  • 接口:IVideoConferenceService
  • 鉴权:OAuth2 Client Credentials(ClientId / ClientSecret + SdkAppId)
  • Provider ID:tencent-meeting

配置

字段类型必填默认值说明
ClientIdstring应用 ID(Client Id)
ClientSecretstring应用密钥(Client Secret)
SdkAppIdstring企业 ID(SDK AppId)
BaseUrlstringhttps://api.meeting.qq.com腾讯会议 REST API 基地址
OAuthBaseUrlstringhttps://api.meeting.qq.comOAuth2 令牌端点基地址
HttpClientNamestringVideoConferenceTencentMeeting业务 HttpClient 命名
TokenHttpClientNamestringVideoConferenceTencentMeetingToken令牌刷新专用 HttpClient 命名
{
"VideoConference": {
"TencentMeeting": {
"ClientId": "your-client-id",
"ClientSecret": "your-client-secret",
"SdkAppId": "your-sdk-app-id"
}
}
}

注册

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

使用示例

var meeting = await service.CreateMeetingAsync(new CreateMeetingRequest
{
Subject = "项目周会",
StartTime = DateTimeOffset.Parse("2026-08-03T10:00:00Z"),
EndTime = DateTimeOffset.Parse("2026-08-03T11:00:00Z"),
Attendees = [new() { Email = "alice@example.com", Name = "Alice" }]
});
// 邀请参会人
await service.InviteAttendeesAsync(new InviteAttendeesRequest
{
MeetingId = meeting.MeetingId,
Attendees = [new() { Email = "bob@example.com" }]
});
// 查询录制
var recordings = await service.ListRecordingsAsync(meeting.MeetingId);

鉴权机制

  • 令牌获取:POST /v1/open-tokengrant_type=client_credentials
  • 令牌缓存:TencentMeetingTokenManager 为 Singleton,双重检查锁,过期前 5 分钟刷新。
  • 业务请求:按请求注入 Authorization: Bearer {token} 头。
  • 令牌失效码 9012/9013/9014 触发自愈:清缓存后下次调用自动刷新。

已知限制

所有供应商标记为 Preview——基本流程走通,边界场景可能未覆盖。

100%

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