Method: people.connections.list

Provides a list of the authenticated user's contacts merged with any connected profiles.
The request throws a 400 error if 'personFields' is not specified.

HTTP request

GET https://people.googleapis.com/v1/{resourceName=people/*}/connections

The URL uses Google API HTTP annotation syntax.

Path parameters

Parameters
resourceName

string

The resource name to return connections for. Only people/me is valid.

Query parameters

Parameters
pageToken

string

The token of the page to be returned.

pageSize

number

The number of connections to include in the response. Valid values are between 1 and 2000, inclusive. Defaults to 100.

sortOrder

enum(SortOrder)

The order in which the connections should be sorted. Defaults to LAST_MODIFIED_ASCENDING.

requestSyncToken

boolean

Whether the response should include a sync token, which can be used to get all changes since the last request.

syncToken

string

A sync token, returned by a previous call to people.connections.list. Only resources changed since the sync token was created will be returned.

requestMask

object(RequestMask)

DEPRECATED (Please use personFields instead)

A mask to restrict results to a subset of person fields.

personFields

string (FieldMask format)

Required. A field mask to restrict which fields on each person are returned. Valid values are:

  • addresses
  • ageRanges
  • biographies
  • birthdays
  • braggingRights
  • coverPhotos
  • emailAddresses
  • events
  • genders
  • imClients
  • interests
  • locales
  • memberships
  • metadata
  • names
  • nicknames
  • occupations
  • organizations
  • phoneNumbers
  • photos
  • relations
  • relationshipInterests
  • relationshipStatuses
  • residences
  • skills
  • taglines
  • urls

Request body

The request body must be empty.

Response body

If successful, the response body contains data with the following structure:

JSON representation
{
  "connections": [
    {
      object(Person)
    }
  ],
  "nextPageToken": string,
  "nextSyncToken": string,
  "totalPeople": number,
  "totalItems": number,
}
Fields
connections[]

object(Person)

The list of people that the requestor is connected to.

nextPageToken

string

The token that can be used to retrieve the next page of results.

nextSyncToken

string

The token that can be used to retrieve changes since the last request.

totalPeople
(deprecated)

number

DEPRECATED (Please use totalItems) The total number of people in the list without pagination.

totalItems

number

The total number of items in the list without pagination.

Authorization

See Connection scopes for more information.

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.
FIRST_NAME_ASCENDING Sort people by first name.
LAST_NAME_ASCENDING Sort people by last name.

Try it!