Method: otherContacts.copyOtherContactToMyContactsGroup

Copies an "Other contact" to a new contact in the user's "myContacts" group

HTTP request

POST https://people.googleapis.com/v1/{resourceName=otherContacts/*}:copyOtherContactToMyContactsGroup

The URL uses gRPC Transcoding syntax.

Path parameters

Parameters
resourceName

string

Required. The resource name of the "Other contact" to copy.

Request body

The request body contains data with the following structure:

JSON representation
{
  "copyMask": string,
  "readMask": string,
  "sources": [
    enum (ReadSourceType)
  ]
}
Fields
copyMask

string (FieldMask format)

Required. A field mask to restrict which fields are copied into the new contact. Valid values are:

  • emailAddresses
  • names
  • phoneNumbers
readMask

string (FieldMask format)

Optional. A field mask to restrict which fields on the person are returned. Multiple fields can be specified by separating them with commas. Defaults to the copy mask with metadata and membership fields if not set. Valid values are:

  • addresses
  • ageRanges
  • biographies
  • birthdays
  • calendarUrls
  • clientData
  • coverPhotos
  • emailAddresses
  • events
  • externalIds
  • genders
  • imClients
  • interests
  • locales
  • memberships
  • metadata
  • miscKeywords
  • names
  • nicknames
  • occupations
  • organizations
  • phoneNumbers
  • photos
  • relations
  • residences
  • sipAddresses
  • skills
  • urls
  • userDefined
sources[]

enum (ReadSourceType)

Optional. A mask of what source types to return. Defaults to [ReadSourceType.CONTACT][google.people.v1.ReadSourceType.CONTACT] and [ReadSourceType.PROFILE][google.people.v1.ReadSourceType.PROFILE] if not set.

Response body

If successful, the response body contains an instance of Person.

Authorization Scopes

Requires one of the following OAuth scopes:

  • https://www.googleapis.com/auth/contacts.other.readonly
  • https://www.googleapis.com/auth/contacts

For more information, see the Authorization guide.