$token = $this->miniApp->create()->access_token->getToken(true);
$client = $this->clientFactory->create();
$res = $client->post('http://api.weixin.qq.com/wxa/servicemarket?access_token=' . $token['access_token'], [
RequestOptions::JSON => [
'service' => 'wxee446d7507c68b11',
'api' => 'imgSecCheck',
'client_msg_id' => 'client_msg_id_1',
'data' => [
'Action' => 'ImageModeration',
'Scenes' => ["PORN", "POLITICS", "TERRORISM"],
"ImageUrl" => $url,
'ImageBase64' => '',
'Config' => '',
'Extra' => ''
]
]
]);
返回 : {"errcode":43002,"errmsg":"require POST method"}