question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

facing issue while update the existing contact

See original GitHub issue

I’m facing error while update the contact. please find the error below,

googleapiclient.errors.HttpError: <HttpError 400 when requesting https://people.googleapis.com/v1/people/[REDACTED]:updateContact?updatePersonFields=%22emailAddresses%22%3A+%5B%7B+%22value%22%3A+%22john.doe%40gmail.com%22+%7D%5D&alt=json returned "Invalid value at 'update_person_fields' (type.googleapis.com/google.protobuf.FieldMask), Field 'update_person_fields', Invalid FieldMask '"emailAddresses": [{ "value": "john.doe@gmail.com" }]'. Map keys should be represented as ["some_key"].". Details: "[{'@type': 'type.googleapis.com/google.rpc.BadRequest', 'fieldViolations': [{'field': 'update_person_fields', 'description': 'Invalid value at \'update_person_fields\' (type.googleapis.com/google.protobuf.FieldMask), Field \'update_person_fields\', Invalid FieldMask \'"emailAddresses": [{ "value": "john.doe@gmail.com" }]\'. Map keys should be represented as ["some_key"].'}]}]">

here it’s my code. Kindly help me to fix the issue.

service = build('people', 'v1', credentials=creds)
service.people().updateContact(
        resourceName='people/[REDACTED]',
        #etag='[REDACTED]',
        updatePersonFields='"emailAddresses": [{ "value": "john.doe@gmail.com" }]').execute()

Thanks!

Issue Analytics

  • State:closed
  • Created 2 years ago
  • Comments:5 (3 by maintainers)

github_iconTop GitHub Comments

1reaction
manirhel-zzcommented, Jun 9, 2021

Thanks a lot!

1reaction
manirhel-zzcommented, Jun 9, 2021

Hi, Many Thanks!. your solution worked awesomely. once i updated the contact the ‘etag’ has changed. if you have any solution for this please suggest me.

Thanks!

Read more comments on GitHub >

github_iconTop Results From Across the Web

I get a Contacts error - Contacts Help - Google Support
"Can't update contact"​​ If you get this error, you might have exceeded your Contacts storage quota. This means you might have saved too...
Read more >
How to update existing contact? - android - Stack Overflow
StructuredPostal.TYPE + "=?"; String[] phoneArgs = new String[] {String.valueOf(ContactId), String.valueOf( ContactsContract.CommonDataKinds.
Read more >
5 Solutions to Fix iCloud Contacts not Syncing [2022]
1. Set contacts to sync with iCloud as the default account · 2. Contacts are not synced in iCloud due to third-party accounts...
Read more >
trigger to update contact when account record is updated
Hi Harshit, Yes, but when Account Name is updated. my current code is below: trigger AccountOppChecker on Account (after update) { List< ...
Read more >
If your iPhone or iPad won't update - Apple Support (IN)
Try updating your device again using the same network. If you still see one of these messages, try updating your device using another...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found