getVoIPSign
获取实时语音签名
请求参数
字段 | 说明 | 数据类型 | 默认值 | 必填 |
---|---|---|---|---|
groupId | 游戏房间的标识 | String | - | Y |
nonce | 随机字符串,长度应小于 128 | String | - | Y |
timestamp | 生成这个随机字符串的 UNIX 时间戳(精确到秒) | Number | - | Y |
Promise 返回参数
字段 | 说明 | 数据类型 |
---|---|---|
signature | 签名 | String |
使用示例
Promise 风格
const cloud = require('wx-server-sdk')
exports.main = async (event, context) => {
const result = await cloud.getVoIPSign({
groupId: 'xxx',
timestamp: 1557056066,
nonce: 'yyy'
})
return result.fileList
}