Hi,
I have been using SOAP API to call some functions. In current scenario i’m passing login and password for authentication, which can be retrieved as
$_SERVER[‘PHP_AUTH_USER’] -Username
$_SERVER[‘PHP_AUTH_PW’] -Password.
Now i want to pass API key also to authenicate. How should i modify the Server Code to accept API key similar to Username or Password.
This is how i used to call SOAP API function.
try {
$client = new SoapClient("wsdl", array(
'login' => 'user',
'password' => 'password'
));
$result = $client->functioname();
} catch(SoapFault $ex) {
}