php-ews
php-ews copied to clipboard
Get contacts in group
How can I get contacts inside a group?
I tried it:
use garethp\ews\ContactsAPI as API;
use garethp\ews\API\Type\FolderIdType;
$api = API::withUsernameAndPassword($host, $email, $pass);
$id = 'groupid';
$changekey = 'changekey';
$folderid = new FolderIdType($id, $changekey);
$contacts = $api->getContacts($folderid);
var_dump($contacts);die;
And I got this error: Expected a folder Id but received an item Id.
I didn't found any method to get group contacts.