Update google contact getting error Request must set person.etag or person.metadata.sources.etag for the source that is being updated

191 Views Asked by At

enter image description here
When google contact update using Api getting error

Request must set "person.etag" or "person.metadata.sources.etag" for the source that is being updated

How can I solved?

When google contact update using Api getting error

Request must set "person.etag" or "person.metadata.sources.etag" for the source that is being updated
1

There are 1 best solutions below

0
Martin Zvarík On

I was receiving this error when I created person like this: $person = new Google_Service_PeopleService_Person()

This will create Person Object, but is missing "etag" (which identifies the contact).

So, to change Person you have to find the Person and then modify it, and then call updateContact()