mdEmail® Registration API

(string) login($username, $password)

In order to use any of the api's functions a user must first request a session id. A session id can be retrieved via a soap request using the "login" method to https://api.max.md/login.php?wsdl.

Response

The response comes in a soap object containing three elements.
  (string) code - A response code. This will be "000" if there is no error
  (string) message - A description of the response code
  (array) values - An array containing the session_id in the first element.

Sample Code (using NuSoap)

$soap = new soapclient("https://api.max.md/login.php?wsdl",array( 'trace' => true, 'exceptions' => true, ));
$response = $soap->login($username, $password);
if ($response->code == '000') {
  $session_id = $response->values[0];
}else{
  echo $response->message;
}

The xml for the WSDL can be found here