Contacts API는 2022년 1월 19일에 지원 중단되었습니다. 이 가이드를 사용하여 People API로 마이그레이션 시 필드, 엔드포인트, 승인 범위 변경사항에 대해 알아보세요.
개요
People API는 기타 연락처를 제외하고 모든 기능에 대해 기존 Contacts API와 동일한 기능을 제공합니다.
- 관리자는 새로운 범위를 통해 '기타 연락처'에 대한 읽기 전용 권한을 갖습니다. '기타 연락처'로 변경/쓰기 신호를 다시 전송하는 기능은 지원되지 않으므로, 사용자가 데이터 필드를 업데이트하려면 기타 연락처를 내 연락처로 추가해야 합니다. 
- API를 통해 '기타 연락처'의 기본 연락처 정보만 읽을 수 있습니다. 예: 이름, 이메일 주소, 전화번호 
또한 개인 연락처와 디렉터리 정보에 모두 액세스할 수 있는 이전 연락처 범위 (https://www.google.com/m8/feeds)가 다음 범위로 대체됩니다.
- 개인 연락처에 액세스하려면 다음 단계를 따르세요. https://www.googleapis.com/auth/contacts
- 디렉터리 정보에 액세스하려면 다음 명령어를 사용하세요. https://www.googleapis.com/auth/directory.readonly
연락처
필드 매핑
| 연락처 입력란 | 사용자 필드 | 
|---|---|
| atom:content | 전기 | 
| atom:link rel='http://schemas.google.com/contacts/2008/rel#photo' | 사진 | 
| atom:title | names | 
| gContact:결제정보 | miscKeyword (type=OUTLOOK_BILLING_INFORMATION) | 
| gContact:생일 | 생일 | 
| gContact:calendarLink | calendarUrls | 
| gContact:directoryServer | miscKeyword (type=OUTLOOK_DIRECTORY_SERVER) | 
| gContact:event | 이벤트 | 
| gContact:extendedProperty | clientData | 
| gContact:externalId | externalIds | 
| gContact:fileAs) | fileAses | 
| gContact:gender | 성별 | 
| gContact:groupMembershipInfo | memberships.contactGroupMembership | 
| gContact:취미 | 관심분야 | 
| gContact:이니셜 | 지원 중단됨 닉네임 (type=INITIALS) | 
| gContact:jot type='home' | miscKeyword (유형=HOME) | 
| gContact:jot type='키워드' | miscKeyword (type=OUTLOOK_KEYWORD) | 
| gContact:jot type='other' | miscKeyword (유형=OTHER) | 
| gContact:jot type='사용자' | miscKeyword (type=OUTLOOK_USER) | 
| gContact:jot type='업무' | miscKeyword (유형=WORK) | 
| gContact:language | 언어 | 
| gContact:maidenName | 지원 중단됨 닉네임 (유형=MAIDEN_NAME) | 
| gContact:mileage | miscKeyword (type=OUTLOOK_MILEAGE) | 
| gContact:nickname | 닉네임 (유형=DEFAULT) | 
| gContact:직업 | 직업 | 
| gContact:우선순위 | miscKeyword (type=OUTLOOK_PRIORITY) | 
| gContact:relation | 관계 | 
| gContact:민감도 | miscKeyword (type=OUTLOOK_SENSITIVITY) | 
| gContact:shortName | 지원 중단됨 닉네임 (유형=SHORT_NAME) | 
| gContact:subject | misc키워드 (유형=OUTLOOK_SUBJECT) | 
| gContact:userDefinedField | userDefined | 
| gContact:website | urls | 
| gContact:yomiName | names.phonetic_full_name | 
| gd:삭제됨 | metadata.deleted | 
| gd:email | emailAddresses | 
| gd:im | imClients | 
| gd:조직 | organizations | 
| gd:phoneNumber | phoneNumbers | 
| gd:postalAddress | addresses.formattedValue | 
| gd:where | 주택 | 
| gd:structuredPostalAddress | 주소 | 
개인 연락처 엔드포인트
읽기
https://www.googleapis.com/auth/contacts 또는 https://www.googleapis.com/auth/contacts.readonly 범위가 필요합니다.
- 특정 연락처 한 개 읽기
people.get
- 특정 연락처 여러 개 읽기
people.getBatchGet
- people.connections.list를 사용하여 연락처 읽기
변형
https://www.googleapis.com/auth/contacts 범위가 필요합니다. 사진을 제외한 모든 연락처 필드를 변경합니다.
- people.createContact를 사용하여 연락처 만들기
- people.updateContact를 사용하여 기존 연락처를 업데이트합니다.
- people.deleteContact를 사용하여 연락처를 삭제합니다.
사진 변형
https://www.googleapis.com/auth/contacts 범위가 필요합니다.
- people.updateContactPhoto를 사용하여 연락처 사진을 업데이트합니다.
- people.deleteContactPhoto를 사용하여 연락처 사진을 삭제합니다.
기타 연락처 엔드포인트
읽기
다른 연락처는 읽기 전용이며 names, emailAddresses, phoneNumbers 필드만 반환됩니다.
https://www.googleapis.com/auth/contacts.other.readonly 범위가 필요합니다.
- otherContacts.list를 사용하여 다른 연락처를 읽습니다.
복사
https://www.googleapis.com/auth/contacts.other.readonly 및 https://www.googleapis.com/auth/contacts 범위가 필요합니다.
- otherContacts.copyOtherContactToMyContactsGroup를 사용하여 다른 연락처를 복사합니다.
전체 주소록 엔드포인트
https://www.googleapis.com/auth/directory.readonly 범위가 필요합니다.
- 모든 디렉터리 연락처 및 프로필을 나열합니다. people.listDirectoryPeople
- 디렉터리 연락처 및 프로필을 검색합니다. 
people.searchDirectoryPeople.
연락처 그룹
필드 매핑
| Contacts API 연락처 그룹 필드 | People API 연락처 그룹 필드 | 
|---|---|
| atom:업데이트됨 | metadata.updateTime | 
| atom:title | name | 
| atom:content | name | 
| gd:삭제됨 | metadata.deleted | 
| systemGroup | groupType=SYSTEM_CONTACT_GROUP | 
엔드포인트
읽기
https://www.googleapis.com/auth/contacts 또는 https://www.googleapis.com/auth/contacts.readonly 범위가 필요합니다.
- people.contactGroups.get를 사용하여 특정 연락처 그룹 가져오기
- people.contactGroups.list를 사용하여 연락처 그룹 나열
변형
https://www.googleapis.com/auth/contacts 범위가 필요합니다.
- people.contactGroups.create을(를) 사용하여 연락처 그룹 만들기
- people.contactGroups.update를 사용하여 연락처 그룹 업데이트
- people.contactGroups.delete를 사용하여 연락처 그룹 삭제
- people.contactGroups.members.modify를 사용하여 연락처 그룹에서 연락처 추가 또는 삭제
승인 범위
기존 범위 https://www.google.com/m8/feeds은 https://www.googleapis.com/auth/contacts 범위의 별칭입니다. 즉, 기존 범위의 기존 OAuth 권한 부여는 https://www.googleapis.com/auth/contacts 범위가 필요한 People API의 모든 엔드포인트에서 작동합니다. 연락처와 연락처 그룹을 읽고 쓰는 기능은 기존 범위에서 작동합니다.
People API에서 '기타 연락처' 또는 디렉터리 데이터에 액세스하려면 새 범위가 필요합니다. 필요한 범위는 위 세부정보를 참고하세요.
자세한 내용은 요청 승인을 참고하세요.
클라이언트 라이브러리
- Apps Script의 경우 고급 사용자 서비스를 참고하세요.
- 지원되는 다른 언어는 클라이언트 라이브러리 설치를 참고하세요.