# picture/Audio Content Security Detection

This interface should be invoked on the server side, seeService API

Asynchronous check picture/Whether the audio contains illegal content.

Examples of application scenarios:

  1. Voice Risk Recognition: Detecting Speech Content Published by Social Users
  2. Picture Intelligence Yellow: Tool Application Involving Taking Pictures(Such as the United States pat, map class applications)User Photo Upload DetectionE-Commerce Goods On The Shelf Picture DetectionImage detection in media user articles, etc.
  3. Sensitive Face Recognition: User AvatarImage Detection in Media User ArticlesDetection of images uploaded by social users. Frequency Limit: Single appId The call upper limit is 2000 second/Minutes, 200,000 second/dayFile size limit: Single file size does not exceed 10 M

# Request address

POST https://api.weixin.qq.com/wxa/Media_check_async?access_token=ACCESS_TOKEN

# Request parameters

attribute type Default value Required Introductions
access_Token / cloudbase_access_Token string yes [Interface call credential]((auth.getAccessToken ))
Media_url string yes Multimedia url to detect
Media_type number yes 1: Audio2: Photo

# Return value

# Object

Returned JSON Data packet

attribute type Introductions
trace_id string Unique request identification, marking a single request, used to match asynchronous push results
Errcode number Error code
errmsg string Error message

Errcode The legal value of

value Introductions Minimum version
0 Detection request received

# Object

Asynchronous detection results in the 30 Will be pushed to your message receiving server within minutes.Click to View Message Receiving Server Configuration
Returned JSON Data packet

attribute type Introductions
ToUser string The username of the Mini Program
FromUserName string Platform Push Service UserName
CreateTime number Sending time
MsgType string Default is: Event
Event string Default is: wxa_Media_check
Isrisky number Detection result, 0: Risk not yet detected, 1: risk
extra_Info_json string Additional information, default to empty
appid string Appid of Mini Programs
trace_id string Task id
status_Code number Default is: 0,4294966288(-1008)Cannot download for link
version number Can be used to differentiate interface versions
result object Comprehensive results
detail array Detailed test results

# Call Example

curl -d '{ "media_url":"https://developers.weixin.qq.com/miniprogram/assets/images/head_global_z_@all.png","media_type":2 }' 'https://api.weixin.qq.com/wxa/Media_check_async?access_token=ACCESS_TOKEN'

# Be careful

Media_type Need to be accurately filled url The corresponding multimedia type, media_url Need to guarantee that it can be downloaded by the detection server

# Interface Return Example

{
   "errcode"  : 0,
   "errmsg"   : "ok",
   "trace_id" : 967e945cd8a3e458f3c74dcb886068e9 
}

# Asynchronous Detection Result Push Example

{
   "ToUserName"       : "gh_38cc49f9733b, 
   "FromUserName"    : "oH1fu0FdHqpToe2T6gBj0WyB8iS1", 
   "CreateTime"      : 1552465698,
   "MsgType"         : "event",
   "Event"           : "wxa_Media_check",
   "isrisky"          : 0,
   "extra_Info_json" : "",
   "Apps"            : "wxd8c59133dfcbfc71",
   "trace_id"        : "967e945cd8a3e458f3c74dcb886068e9" 
   "status_code"     : 0
}

If you encounter problems during the call, you can use the[The official community](https://developers.weixin.qq.com/community/Minihome /mixflow/1591986099080445956)Post exchange.