AI-generated Key Takeaways
- 
          Provides a paginated list of the authenticated user's contacts, including how to retrieve the next page and changes. 
- 
          Allows for sorting connections by last modified time or name, and filtering by source type and specific person fields. 
- 
          Sync tokens can be used to retrieve incremental changes but expire after 7 days, requiring a full sync request. 
- 
          Full sync requests have an initial quota, which may result in a 429 error if exceeded. 
- 
          Requests with sync or page tokens require all other parameters to match the initial call for consistency. 
- HTTP request
- Path parameters
- Query parameters
- Request body
- Response body
- Authorization scopes
- SortOrder
- Try it!
Provides a list of the authenticated user's contacts.
Sync tokens expire 7 days after the full sync. A request with an expired sync token will get an error with an google.rpc.ErrorInfo with reason "EXPIRED_SYNC_TOKEN". In the case of such an error clients should make a full sync request without a syncToken
The first page of a full sync request has an additional quota. If the quota is exceeded, a 429 error will be returned. This quota is fixed and can not be increased.
When the syncTokenPersonMetadata.deleted
When the pageTokensyncToken
Writes may have a propagation delay of several minutes for sync requests. Incremental syncs are not intended for read-after-write use cases.
See example usage at List the user's contacts that have changed.
HTTP request
GET https://people.googleapis.com/v1/{resourceName=people/*}/connections
The URL uses gRPC Transcoding syntax.
Path parameters
| Parameters | |
|---|---|
| resourceName | 
 Required. The resource name to return connections for. Only  | 
Query parameters
| Parameters | |
|---|---|
| pageToken | 
 Optional. A page token, received from a previous response  When paginating, all other parameters provided to  | 
| pageSize | 
 Optional. The number of connections to include in the response. Valid values are between 1 and 1000, inclusive. Defaults to 100 if not set or set to 0. | 
| sortOrder | 
 Optional. The order in which the connections should be sorted. Defaults to  | 
| requestSyncToken | 
 Optional. Whether the response should return  More details about sync behavior at  | 
| syncToken | 
 Optional. A sync token, received from a previous response  When syncing, all other parameters provided to  More details about sync behavior at  | 
| requestMask | 
 Optional. DEPRECATED (Please use  A mask to restrict results to a subset of person fields. | 
| personFields | 
 Required. A field mask to restrict which fields on each person are returned. Multiple fields can be specified by separating them with commas. Valid values are: 
 | 
| sources[] | 
 Optional. A mask of what source types to return. Defaults to  | 
Request body
The request body must be empty.
Response body
The response to a request for the authenticated user's connections.
If successful, the response body contains data with the following structure:
| JSON representation | 
|---|
| {
  "connections": [
    {
      object ( | 
| Fields | |
|---|---|
| connections[] | 
 The list of people that the requestor is connected to. | 
| nextPageToken | 
 A token, which can be sent as  | 
| nextSyncToken | 
 A token, which can be sent as  | 
| totalPeople | 
 DEPRECATED (Please use totalItems) The total number of people in the list without pagination. | 
| totalItems | 
 The total number of items in the list without pagination. | 
Authorization scopes
Requires one of the following OAuth scopes:
- https://www.googleapis.com/auth/contacts
- https://www.googleapis.com/auth/contacts.readonly
For more information, see the Authorization guide.
SortOrder
The order in which a list of connections should be sorted. This is only used if sync is not requested.
| Enums | |
|---|---|
| LAST_MODIFIED_ASCENDING | Sort people by when they were changed; older entries first. | 
| LAST_MODIFIED_DESCENDING | Sort people by when they were changed; newer entries first. | 
| FIRST_NAME_ASCENDING | Sort people by first name. | 
| LAST_NAME_ASCENDING | Sort people by last name. |