Method: otherContacts.copyOtherContactToMyContactsGroup
컬렉션을 사용해 정리하기
내 환경설정을 기준으로 콘텐츠를 저장하고 분류하세요.
달리 명시되지 않는 한 이 페이지의 콘텐츠에는 Creative Commons Attribution 4.0 라이선스에 따라 라이선스가 부여되며, 코드 샘플에는 Apache 2.0 라이선스에 따라 라이선스가 부여됩니다. 자세한 내용은 Google Developers 사이트 정책을 참조하세요. 자바는 Oracle 및/또는 Oracle 계열사의 등록 상표입니다.
최종 업데이트: 2024-08-21(UTC)
[null,null,["최종 업데이트: 2024-08-21(UTC)"],[[["\u003cp\u003eCopies an "Other contact" to the user's "myContacts" group, allowing you to easily manage and organize your contacts.\u003c/p\u003e\n"],["\u003cp\u003eThe API request requires specifying the resource name of the "Other contact" and allows for optional control over fields to be copied and returned using field masks.\u003c/p\u003e\n"],["\u003cp\u003eYou can specify which data sources to consider for the copy operation, and the response includes the newly created "myContacts" person object.\u003c/p\u003e\n"],["\u003cp\u003eRequires authorization with specific OAuth scopes related to contact management.\u003c/p\u003e\n"],["\u003cp\u003eFor optimal performance, ensure sequential requests for the same user to avoid latency or failures.\u003c/p\u003e\n"]]],["This describes copying an \"Other contact\" to a user's \"myContacts\" group using a `POST` request to `https://people.googleapis.com/v1/{resourceName=otherContacts/*}:copyOtherContactToMyContactsGroup`. The `resourceName` path parameter specifies the \"Other contact\" to copy. The request body requires a `copyMask` to specify fields to copy, and optionally `readMask` and `sources`. Successful requests return a `Person` instance. Mutate requests for the same user should be sequential. Authorization requires specific OAuth scopes.\n"],null,["# Method: otherContacts.copyOtherContactToMyContactsGroup\n\n- [HTTP request](#body.HTTP_TEMPLATE)\n- [Path parameters](#body.PATH_PARAMETERS)\n- [Request body](#body.request_body)\n - [JSON representation](#body.request_body.SCHEMA_REPRESENTATION)\n- [Response body](#body.response_body)\n- [Authorization scopes](#body.aspect)\n- [Try it!](#try-it)\n\nCopies an \"Other contact\" to a new contact in the user's \"myContacts\" group\n\nMutate requests for the same user should be sent sequentially to avoid increased latency and failures.\n\n### HTTP request\n\n`POST https://people.googleapis.com/v1/{resourceName=otherContacts/*}:copyOtherContactToMyContactsGroup`\n\nThe URL uses [gRPC Transcoding](https://google.aip.dev/127) syntax.\n\n### Path parameters\n\n| Parameters ||\n|----------------|----------------------------------------------------------------------|\n| `resourceName` | `string` Required. The resource name of the \"Other contact\" to copy. |\n\n### Request body\n\nThe request body contains data with the following structure:\n\n| JSON representation |\n|--------------------------------------------------------------------------------------------------------------|\n| ``` { \"copyMask\": string, \"readMask\": string, \"sources\": [ enum (/people/api/rest/v1/ReadSourceType) ] } ``` |\n\n| Fields ||\n|-------------|----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| `copyMask` | `string (`[FieldMask](https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#google.protobuf.FieldMask)` format)` Required. A field mask to restrict which fields are copied into the new contact. Valid values are: - emailAddresses - names - phoneNumbers |\n| `readMask` | `string (`[FieldMask](https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#google.protobuf.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 - locations - memberships - metadata - miscKeywords - names - nicknames - occupations - organizations - phoneNumbers - photos - relations - sipAddresses - skills - urls - userDefined |\n| `sources[]` | `enum (`[ReadSourceType](/people/api/rest/v1/ReadSourceType)`)` Optional. A mask of what source types to return. Defaults to [READ_SOURCE_TYPE_CONTACT](/people/api/rest/v1/ReadSourceType#ENUM_VALUES.READ_SOURCE_TYPE_CONTACT) and [READ_SOURCE_TYPE_PROFILE](/people/api/rest/v1/ReadSourceType#ENUM_VALUES.READ_SOURCE_TYPE_PROFILE) if not set. |\n\n### Response body\n\nIf successful, the response body contains an instance of [Person](/people/api/rest/v1/people#Person).\n\n### Authorization scopes\n\nRequires one of the following OAuth scopes:\n\n- `https://www.googleapis.com/auth/contacts.other.readonly`\n- `https://www.googleapis.com/auth/contacts`\n\nFor more information, see the [Authorization guide](/workspace/guides/configure-oauth-consent)."]]