I use Google people API to update a contact.
I save the resourceName of the created contact and when I update the contact, I just use this code
People.People.updateContact({"emailAddresses": [{
"type": "work",
"value": "[email protected]"
}]}, "people/c6679930577989153852")
But this throws error - GoogleJsonResponseException: API call to people.people.updateContact failed with error: Request must set person.etag or person.metadata.sources.etag for the source that is being updated.
How do I create an etag if I dont store the created etag at the time of contact creation? Is there a way I can create a new etag using a function so I can force update the entire contact?
if so how do I create a updatePersonFields mask?