Closed xciser77 closed 4 years ago
You will need to do a UserGetLoginInfoRequest, then in the UserGetLoginInfoResponse will return
$serviceProviderId
will be the service provider ID result or null.
<?php
require_once 'vendor/autoload.php';
use BroadworksOCIP\api\Rel_17_sp4_1_197_OCISchemaAS\OCISchemaLogin\UserGetLoginInfoRequest;
$client = BroadworksOCIP\Factory::getSOAPClient('ocip.example.com');
if ($client->login('user', 'pass')) {
$request = new UserGetLoginInfoRequest();
$serviceProviderId = $request->get($client)->getServiceProviderId();
$client->logout();
}
?>
After login I like to get the serviceProviderID because it is needed for some/many request. I can find the spid after login with $client->getResponse(), but it is protected so i cannot get the value.
How can I get the serviceproviderid after login ? Code I use is: $client = Factory::getSOAPClient('serveradres); $client->login('username','password');
In the above code I removed the server/username/password