Am trying to send this request using Soap Client in php to Soap bases API but Am receiving auth error
as response of my request
This is my request
$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);
How do I solve this error