php-ews icon indicating copy to clipboard operation
php-ews copied to clipboard

Get contacts in group

Open JulyanoF opened this issue 7 years ago • 0 comments

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.

JulyanoF avatar May 15 '18 19:05 JulyanoF