首页
学习
活动
专区
工具
TVP
发布
社区首页 >问答首页 >图片鉴黄接口报错"code":3,"message":"don't find appid ……"?

图片鉴黄接口报错"code":3,"message":"don't find appid ……"?

提问于 2019-11-18 23:49:59
回答 3关注 0查看 639

我在进行图像鉴黄测试是报错,下面是我的代码和云端的报错,在网上找了好久没有找到原因,帮忙看下:

const cloudAppId = "XXXX";

const secretId = "XXXXX";

const secretKey = "XXXXX";

const TOKEN_URL = "https://api.weixin.qq.com/cgi-bin/token?grant_type=client_credential&appid=" + appId + "&secret=" + appsecretId;

const CHECK_URL = "https://api.weixin.qq.com/wxa/msg_sec_check?access_token=";

function getImageUrl(fileId)

{

const baseUrl = "https://636c-cloudde-5c0a91-1300515261.tcb.qcloud.la";

const baseFileId = "cloud://cloudde-5c0a91.636c-cloudde-5c0a91-1300515261";

const path = fileId.replace(baseFileId, baseUrl);

return path;

};

// 云函数入口函数

exports.main = async (event, context) => {

console.log(event);

const content = event.content;

const location = event.location;

const author = event.author;

const images = event.images;

const imageUrls = [];

images.forEach((value, index)=>{

const imageUrl = getImageUrl(value)

imageUrls.push(imageUrl);

});

//图片鉴黄

console.log(cloudAppId);

console.log("????????");

const imageclient = new ImageClient({cloudAppId, secretId, secretKey});

const imageResp = await imageclient.imgPornDetect({

data: {

url_list: imageUrls

}

})

console.log('------------------');

console.log(imageResp.body);

console.log("=============-")

//文字处理

………………

}

云端报错:

2019-11-18T15:41:32.611Z XXXXX

2019-11-18T15:41:32.611Z ????????

2019-11-18T15:41:32.669Z ------------------

2019-11-18T15:41:32.669Z {"code":3,"message":"don't find appid or appid is illegal"}

谢谢

回答

和开发者交流更多问题细节吧,去 写回答
相关文章

相似问题

相关问答用户
领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档