Google Update My Contacts
After you've completed the steps in Get Ready to Use the People API you are ready to read and manage contacts.
The following code samples demonstrate how to send a few simple requests:
On February 12, 2019, old Contacts will be turned off completely, and any remaining users will be moved to new Contacts. There will be no option to use the o. If you're using Google Apps with a particular domain, your Contacts page can usually be found at google.com/contacts/a/sitename.com/, replacing sitename.com with your own organization's URL. Go to the Phone section of your Google Account. Next to 'Usage,' look for 'Ads Personalization.' Stop using your number for ads. You can keep 'Ads Personalization' on for your Google Account, but stop your number from being used to tailor ads. Go to the Phone section of your Google Account. Next to your number, select Delete Remove number. Clear both app cache and data for Google Contacts. Go to Settings Apps Manager, then swipe to All and choose Contact Sync. Select Clear cache and clear data. Remove your Google Account and set everything up once again. Ask questions and get advice on Google Account features and settings. Visit the Google Account community. Report an issue. Let us know if something.
- List the user's contacts.
- Search the user's contacts.
- Create a new contact.
- Update an existing contact.
- Delete an existing contact.
- Batch create new contacts.
- Batch update existing contacts.
- Batch delete existing contacts.
For a full list of methods, see the referencedocumentation.
Only contact based people can be modified. Profile based people read using resource name'people/me'
or by an account ID can not be modified.
List the user's contacts
To get a list ofpeople in the user's contacts, use the following code:
You can get a list of only changed contacts by settingrequestSyncToken
to true
in the request, and then using the syncToken
returned in the response in the syncToken
param for the next request. Sync tokens expire after 7 days, and will result in a 410 error. To handle that error, clients should send a request without the syncToken
to get the full list of contacts.Search the user's contacts
To search all of the user's contacts, use the following code:
Protocol
Java
How To Delete Google Contacts
Search does a prefix match of the query with the fields on a person. For example, a person with name 'foo name' matches queries such as 'f', 'fo', 'foo', 'foo n', 'nam', etc., but not 'oo n'.Create a new contact
To create a new contact, use the following code:
Update an existing contact
To update an existing contact, you mustinclude the person.metadata.sources.etag
field in the person for the contact to beupdated to make sure the contact has not changed since your last read. Use the following code:
Protocol
Java
Delete an existing contact
To delete an existing contact, use the following code:
Batch create new contacts
To batch create new contacts, use the following code:
Protocol
Java
Batch update existing contacts
To update an existing contact, you mustinclude the person.metadata.sources.etag
field in each person for the contact to beupdated to make sure the contact has not changed since your last read. Use the following code:
Batch delete existing contacts
To batch delete existing contacts, use the following code: