- 直播服务端云调用接口全都用不起!提示找不到api,报错:系统错误!sdk 2.4.0开发者版本1.5以上。如:deleteSubAnchor
- editRoom
- getAssistantList
- getFollowers
- getLiveInfo
- getPushUrl
以上这些都是找不到api,
云函数代码如下:
const cloud = require('wx-server-sdk')
cloud.init({
env: "songzhaoyun-5gy764xh2fc21226480"
})
exports.main = async (event, context) => {
const getLiveInfo = cloud.openapi.livebroadcast.getLiveInfo({
url: 'https://api.weixin.qq.com/wxa/business/getliveinfo',
start: 0,
limit: 10
});
const GET = await getLiveInfo
return {
event,
GET
}
}
config.josn:
{
"permissions": {
"openapi": [
"livebroadcast.getLiveInfo"
]
}
}
检查下你的基础库是那个版本
livebroadcast.deleteRoom
接口名前边都有这个livebrroadcast