← 返回列表
未验证
用 Go 快速接入腾讯会议 API,创建和管理会议
尚未跑自动兼容性验证,可查看页面内的依赖与入口分析。 · 最近上游提交 2024/3/31 · 已提供中文文档
综合分
0.9
GitHub 分
0.9
用户评分
—
★ Stars
1
周下载量
—
安装插件(需先安装 dsh CLI 引擎:npm install -g @deepseek-ai/dsh)
dsh plugin --profile web add xiangpc/wemeet-openapi该插件未发布到 npm,走 GitHub 源安装(pnpm 若拦截 prepare 脚本,按其提示在 pnpm-workspace.yaml 的 allowBuilds 中放行后重跑)
数据截至 2026/9/16(元数据每日更新 · 实装验证按队列轮转,单条结论的验证时间见上方)
用户评分
还没有人投票,来当第一个
订阅周报,不错过优质插件更新
每周一封 · 高评分插件 + 新用户活动
README
简介
欢迎使用腾讯会议开发者工具套件(SDK)1.1.0,为方便 GO 开发者调试和接入腾讯云会议 API,这里向您介绍适用于 GO 的腾讯会议开发工具包,并提供首次使用开发工具包的简单示例。让您快速获取腾讯会议 GO SDK 并开始调用。
依赖环境
1. 购买腾讯会议企业版获取 SecretID、SecretKey,接入的企业 AppId。
获取安装
在第一次使用云API之前,用户首先需要在腾讯云控制台上申请安全凭证,安全凭证包括 SecretID 和 SecretKey,SecretID 是用于标识 API 调用者的身份,SecretKey 是用于加密签名字符串和服务器端验证签名字符串的密钥 SecretKey 必须严格保管,避免泄露。
安装
require github.com/TencentCloud/wemeet-openapi-sdk-go
示例
以创建会议接口为例:
package example
import (
wemeet "github.com/TencentCloud/wemeet-openapi-sdk-go/wemeet_openapi"
wemeetcore "github.com/TencentCloud/wemeet-openapi-sdk-go/wemeet_openapi/core"
wemeethttp "github.com/TencentCloud/wemeet-openapi-sdk-go/wemeet_openapi/core/xhttp"
meetings "github.com/TencentCloud/wemeet-openapi-sdk-go/wemeet_openapi/service/meetings"
"context"
"fmt"
"math/rand"
"os"
"strconv"
"time"
)
// CreateMeetingDemo 创建会议请求demo
func CreateMeetingDemo() {
// 1.构造 client 客户端(jwt 鉴权需要配置 appId sdkId secretID 和 secretKey)
client := wemeet.NewClient(wemeet.WithAppId("2*46"), wemeet.WithSdkId("250"),
wemeet.WithSecret("ZkJ8h", "Y2zWRsVksn"))
// 2.构造请求体
request := &meetings.ApiV1MeetingsPostRequest{
Body: &meetings.V1MeetingsPostRequest{
Instanceid: 1,
MeetingType: wemeetcore.PtrInt32(0),
Subject: "测试会议",
Type: 1,
Userid: "userid",
StartTime: "1651334400",
EndTime: "1651377600",
},
}
// 3.构造 JWT 鉴权器
// 随机数
rn := rand.New(rand.NewSource(time.Now().UnixNano()))
nonce := uint64(100000 + rn.Intn(900000))
// 当前时间戳
curTs := strconv.Itoa(int(time.Now().Unix()))
authenticator := &wemeetcore.JWTAuthenticator{
Nonce: nonce,
Timestamp: curTs,
}
// 4.发送对应的请求
response, err := client.MeetingsApi.V1MeetingsPost(context.Background(), request,
wemeetcore.WithJWTAuth(authenticator))
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling MeetingsApi.V1MeetingsPost: %v\n", err)
if svrErr, ok := err.(wemeetcore.ServiceError); ok {
fmt.Fprintf(os.Stderr, "Full HTTP response: %s\n", svrErr.RawBody)
}
}
// response from V1MeetingsPost: V1MeetingsPostResponse200
fmt.Fprintf(os.Stdout, "Response from MeetingsApi.V1MeetingsPost: %+v\n", response)
return
}扫码进群