Open session
string sessionOpen(string idReseller, string password, array preferences)
Returns information about the requested API session.
Learn more about sessions management
Need an API Client?
Speed up your integration by using our API client for SOAP
Return the information of the requested session.
REQUIRED
-
idReseller
string
(8)
Reseller account ID
-
password
string
Reseller account password
OPTIONAL
-
preferences
array
Session preferences
-
preferences.lang
string
(2)
Language in which the API will respond (EN, FR)
-
preferences.sync
integer
(1)
Asynchronous or synchronous processing of operations (0, 1)
-
preferences.syncDelay
integer
Maximum waiting time for return of synchronous operations (-1 – 127)
-
preferences.notif
integer
(1)
Disable or enable operation notifications (0, 1)
A String (32) containing a session ID
The session ID must be kept for next function calls.
$clientSOAP = new SoapClient('https://URL.wsdl');
$preferences = array(
'lang' => 'EN',
'sync' => 1,
'notif' => 0,
);
try {
$idSession = $clientSOAP->sessionOpen('XX000', 'xxxxxxxx', $preferences);
} catch (SoapFault $fault) {
echo 'Exception : ' . $fault->getMessage() . "\n";
}
if (isset($idSession)) {
$clientSOAP->sessionClose($idSession);
}