Table of contents
error - no permission
{"errno": 102, "errMsg": "startFacialRecognitionVerifyAndUploadVideo:fail:access denied"}
the code
import Taro, {
Component } from '@tarojs/taro'
class Home extends Component {
constructor(props) {
super(props)
}
state = {
result: 'cs ',
}
componentDidMount() {
console.log('111111----', 111111)
const that = this
// Taro.startFacialRecognitionVerifyAndUploadVideo({
Taro.startFacialRecognitionVerify({
name: '测试名', // 真实姓名
idCardNumber: '330xxx19xxxxxxxx', // 真实身份证号码
success(res) {
console.log('res--success--', res)
that.setState({
result: 'success',
})
},
fail(res) {
console.log('res--fail--', res)
that.setState({
result: 'fail',
})
},
complete(res) {
console.log('res--complete--', res)
// that.setState({
// result: 'complete',
// })
},
})
}
componentWillUnmount() {
}
config = {
navigationBarTitleText: '扫脸',
}
render() {
return <View className='AI-Content'>测试{
this.state.result}</View>
}
}
solve
Open the face verification authority on each platform of WeChat public.
After submitting the information, it will be displayed 申请中
→ waiting for review
- Detailed steps to open face verification, API opened and other information
【Replenish】
-
If after the face verification is enabled, the call to the API still reports an error
{"errno": 102, "errMsg": "startFacialRecognitionVerifyAndUploadVideo:fail:access denied"}
, check whether the called API is consistent with the opened API (I call it andTaro.startFacialRecognitionVerifyAndUploadVideo()
it still reports an error, after checking the document, useTaro.startFacialRecognitionVerify()
the call to be normal)
-
If you have other questions, you can add the WeChat group and ask the staff