小程序直播组件服务端云调用接口全不能用,提示errCode: -604100 API not fo?
- 直播服务端云调用接口全都用不起!提示找不到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"
]
}
}