Contacts Service Stay organized with collections Save and categorize content based on your preferences.
Page Summary
The Contacts service is deprecated and users should instead use the People API advanced service.
This service allows scripts to access and modify Google Contacts for both individuals and groups.
The documentation lists various classes related to contacts and their fields, such as AddressField, CompanyField, Contact, and ContactGroup.
Several methods are documented for accessing and modifying information within these contact field classes, such as
getAddress(),getLabel(),setAddress(), andsetLabel().
Deprecated. Instead, use thePeople API advanced service
This service allows scripts to access and modify Google Contacts, both forindividual contacts and for groups.
Classes
| Name | Brief description |
|---|---|
| Address field in a contact. |
| Company field in a Contact. |
| A Contact contains the name, address, and various contact details of a contact. |
| A ContactGroup is is a group of contacts. |
| This class allows users to access their own Google Contacts and create, remove, and updatecontacts listed therein. |
| A custom field in a Contact. |
| A date field in a Contact. |
| An email field in a Contact. |
| An enum for extended contacts fields. |
| An enum for contacts fields. |
| An enum for contact gender. |
| An instant messaging field in a Contact. |
| A phone number field in a Contact. |
| An enum for contact priority. |
| An enum for contact sensitivity. |
| A URL field in a Contact. |
AddressField
Methods
| Method | Return type | Brief description |
|---|---|---|
get | String | Get the address for this field. |
get | Object | Gets the label for this field. |
is | Boolean | Gets whether this is the primary field value. |
set | | Sets the address of this field. |
set | | Sets this field to primary. |
set | | Sets the label of this field. |
set | | Sets the label of this field. |
CompanyField
Contact
ContactGroup
ContactsApp
CustomField
Methods
| Method | Return type | Brief description |
|---|---|---|
get | Object | Gets the label for this field. |
set | | Sets the label of this field. |
DateField
Methods
| Method | Return type | Brief description |
|---|---|---|
get | Object | Gets the label for this field. |
set | | Sets the label of this field. |
EmailField
Methods
| Method | Return type | Brief description |
|---|---|---|
get | String | Get the address for this field. |
get | Object | Gets the label for this field. |
is | Boolean | Gets whether this is the primary field value. |
set | | Sets the address of this field. |
set | | Sets this field to primary. |
set | | Sets the label of this field. |
set | | Sets the label of this field. |
ExtendedField
Field
Gender
IMField
Methods
| Method | Return type | Brief description |
|---|---|---|
get | String | Get the address for this field. |
get | Object | Gets the label for this field. |
is | Boolean | Gets whether this is the primary field value. |
set | | Sets the address of this field. |
set | | Sets this field to primary. |
set | | Sets the label of this field. |
set | | Sets the label of this field. |
PhoneField
Methods
| Method | Return type | Brief description |
|---|---|---|
get | Object | Gets the label for this field. |
is | Boolean | Gets whether this is the primary field value. |
set | | Sets this field to primary. |
set | | Sets the label of this field. |
set | | Sets the label of this field. |
Priority
Sensitivity
UrlField
Methods
| Method | Return type | Brief description |
|---|---|---|
get | String | Get the address for this field. |
get | Object | Gets the label for this field. |
is | Boolean | Gets whether this is the primary field value. |
set | | Sets the address of this field. |
set | | Sets this field to primary. |
set | | Sets the label of this field. |
set | | Sets the label of this field. |
Except as otherwise noted, the content of this page is licensed under theCreative Commons Attribution 4.0 License, and code samples are licensed under theApache 2.0 License. For details, see theGoogle Developers Site Policies. Java is a registered trademark of Oracle and/or its affiliates.
Last updated 2025-12-11 UTC.