Required parameter personFields is missing from people_connections->listPeopleConnections
Without parameter personFields:
$contactsvc->people_connections->listPeopleConnections("people/me", ["pageSize"=>10]);
The request gives you following error:
Google_Service_Exception
{
"error":
{
"code": 400,
"message": "personFields mask is required. Please specify one or more valid paths. Valid paths are documented at https://developers.google.com/people/api/rest/v1/people/get.",
"errors": [...],
"status": "INVALID_ARGUMENT"
}
}
This is normal because the personFields parameter is required. See the API reference.
With parameter personFields:
$contactsvc->people_connections->listPeopleConnections("people/me", ["pageSize"=>10, "personFields"=>"names,emailAddresses"]);
You get the following error in the client itself:
Google_Exception
(list) unknown parameter: 'personFields'
The solution is to add the personFields parameter to People.php.
This gives the correct result: Google_Service_People_ListConnectionsResponse containing the requested contacts.
This issue has been fixed in the API.
Hello,
I still have the same error, Google_Exception (list) unknown parameter: 'personFields'.
There is a discussion on StackOverflow about this.
I check the official document and it say "requestMask.includeField is already DEPRECATED." but it still in api's code by somehow.
I didn't have time to try this until now. @drasill you're right, this problem doesn't seem to be solved at all.
Please reopen this issue. I could send a PR with the changes for People.php, but I think these code files get generated somehow, so that won't help...
Ping. Same problem for me.