我正在尝试使用php中的Soap Client向Soap bases API发送此请求,但正在收到auth error
作为我的请求的响应
这是我的要求
$options = array(
'cache_wsdl' => 0,
'trace' => 1,
'stream_context' => stream_context_create(array(
'ssl' => array(
'verify_peer' => false,
'verify_peer_name' => false,
'allow_self_signed' => true
)
)));
$client = new \SoapClient('https://alison.com/api/service.php?wsdl', $options);
$header = array();
$auth = array(
'alisonOrgId' => '9ReXlYlpOThe24AWisE',
'alisonOrgKey' => 'C2owrOtRegikaroXaji'
);
$header[] = new \SoapHeader('https://alison.com/api/service.php?wsdl', 'credentials', $auth,false);
$client->__setSoapHeaders($header);
$res = $client->getUserId('example@gmail.com');
dd($res);
如何解决此错误