Search code examples
phpapisoapzimbra

Get zimbra user address book using delegation auth


I'm trying to retrieve a zimbra user address book but i can't figure out how to do it by using delegated auth. I'm able to retrieve the auth token but then i have no idea on where i should use it.

This is what i'm doing to retrieve the auth token:

$api = new \Zimbra\ZCS\SoapClient('host', '7071', 'user@domain', 'passwd');
$parms = ['account' => ['by' => 'name', '_' => 'anotheruser@domain']];
$response = $api->request('DelegateAuthRequest', [], $parms);
$authToken = $response->children()->children()->authToken;

I'm using nucleus-be/zimbra lib


Solution

  • A word of advice: use the SOAP module. It will mean more work, but it's better than current OO implementations for PHP