공유 연락처 가져오기

공유 사용자 연락처를 다음과 같은 다양한 방법으로 요청할 수 있습니다.

  • 모든 공유 연락처
  • 지정된 기준에 맞는 연락처 집합입니다.
  • 공유 연락처 한 개
  • 연락처 사진

기본적으로 피드의 항목은 정렬되지 않습니다.

공유 연락처 모두 가져오기

  1. 모든 공유 연락처를 가져오려면 연락처 피드 URL에 HTTP GET 요청을 보냅니다.

    GET https://www.google.com/m8/feeds/contacts/DOMAIN/PROJECTION
    

    다음을 바꿉니다.

    • DOMAIN: 도메인의 URL(예: example.com)
    • PROJECTION: gd:extendedProperty 요소를 지정하는 프로젝션 값입니다. 지원되는 값 목록은 프로젝션 값을 참고하세요.

    피드는 HTTP 200 OK 상태 코드와 연락처가 포함된 표준 Atom 1.0 피드를 반환합니다. 다음은 항목이 하나뿐인 연락처 피드의 예입니다.

    <feed xmlns='http://www.w3.org/2005/Atom'
        xmlns:openSearch='http://a9.com/-/spec/opensearchrss/1.0/'
        xmlns:gd='http://schemas.google.com/g/2005'
        xmlns:gContact='http://schemas.google.com/contact/2008'
        xmlns:batch='http://schemas.google.com/gdata/batch'>
      <id>https://www.google.com/m8/feeds/contacts/example.com/base</id>
      <updated>2008-03-05T12:36:38.836Z</updated>
      <category scheme='http://schemas.google.com/g/2005#kind'
        term='http://schemas.google.com/contact/2008#contact' />
      <title type='text'>example.com's Contacts</title>
      <link rel='http://schemas.google.com/g/2005#feed'
        type='application/atom+xml'
        href='https://www.google.com/m8/feeds/contacts/example.com/full' />
      <link rel='http://schemas.google.com/g/2005#post'
        type='application/atom+xml'
        href='https://www.google.com/m8/feeds/contacts/example.com/full' />
      <link rel='http://schemas.google.com/g/2005#batch'
        type='application/atom+xml'
        href='https://www.google.com/m8/feeds/contacts/example.com/full/batch' />
      <link rel='self' type='application/atom+xml'
        href='https://www.google.com/m8/feeds/contacts/example.com/full?max-results=25' />
      <author>
        <name>example.com</name>
        <email>example.com</email>
      </author>
      <generator version='1.0' uri='https://www.google.com/m8/feeds/contacts'>
        Contacts
      </generator>
      <openSearch:totalResults>1</openSearch:totalResults>
      <openSearch:startIndex>1</openSearch:startIndex>
      <openSearch:itemsPerPage>25</openSearch:itemsPerPage>
      <entry>
        <id>
          https://www.google.com/m8/feeds/contacts/example.com/base/c9012de
        </id>
        <updated>2008-03-05T12:36:38.835Z</updated>
        <category scheme='http://schemas.google.com/g/2005#kind'
          term='http://schemas.google.com/contact/2008#contact' />
        <title type='text'>Fitzgerald</title>
        <gd:name>
          <gd:fullName>Fitzgerald</gd:fullName>
        </gd:name>
        <link rel="http://schemas.google.com/contacts/2008/rel#photo" type="image/*"
          href="http://google.com/m8/feeds/photos/media/example.com/c9012de"/>
        <link rel='self' type='application/atom+xml'
          href='https://www.google.com/m8/feeds/contacts/example.com/full/c9012de' />
        <link rel='edit' type='application/atom+xml'
          href='https://www.google.com/m8/feeds/contacts/example.com/full/c9012de/1204720598835000' />
        <gd:phoneNumber rel='http://schemas.google.com/g/2005#home'
          primary='true'>
          456
        </gd:phoneNumber>
        <gd:extendedProperty name="pet" value="hamster" />
      </entry>
    </feed>
    
  2. 피드가 단일 응답에서 10MB를 초과하는 크기를 반환하지 않습니다. 전체 연락처 목록을 가져오려면 반환 피드에 해당 링크가 더 이상 표시되지 않을 때까지 반환된 피드의 다음 링크를 반복해서 따라갑니다.

쿼리 매개변수를 사용하여 공유 연락처 가져오기

지정된 기준과 일치하는 연락처 집합을 요청할 수 있습니다(예: 지정된 날짜 이후에 업데이트된 연락처 요청). 전체 텍스트 쿼리나 이메일 주소로 연락처를 찾는 기능은 지원되지 않습니다. 지원되는 쿼리 매개변수의 전체 목록은 Domain Shared Contacts API 참조 가이드를 확인하세요.

  1. 정의된 매개변수를 사용하여 연락처 피드 URL에 HTTP GET 요청을 전송합니다.

    GET https://www.google.com/m8/feeds/contacts/DOMAIN/PROJECTION?PARAMETER
    

    다음을 바꿉니다.

    • DOMAIN: 도메인의 URL(예: example.com)
    • PROJECTION: gd:extendedProperty 요소를 지정하는 프로젝션 값입니다. 지원되는 값 목록은 프로젝션 값을 참고하세요.
    • PARAMETER: 지원되는 쿼리 매개변수 중 하나입니다. 자세한 내용은 Domain Shared Contacts API 참조 가이드를 확인하세요.

    예를 들어 example.com과 같이 2022년 3월 16일 이후에 모든 도메인 공유 연락처 항목을 업데이트하려면 도메인 공유 연락처 피드 URL에 HTTP 요청을 전송하고 요청 URL에 updated-min 매개변수를 추가합니다.

    GET https://www.google.com/m8/feeds/contacts/example.com/full?updated-min=2022-03-16T00:00:00
    

    GET 요청을 보내면 서버에서 HTTP 200 OK 상태 코드와 지정된 날짜 이후에 생성되거나 업데이트된 도메인 공유 연락처가 포함된 피드를 반환합니다.

  2. 피드가 단일 응답에서 10MB를 초과하는 크기를 반환하지 않습니다. 지정된 기준으로 전체 연락처 목록을 가져오려면 반환 피드에 해당 링크가 더 이상 표시되지 않을 때까지 반환된 피드의 다음 링크를 반복적으로 따릅니다.

점진적 변경사항 추적

도메인 공유 연락처 목록의 증분 변경사항을 추적하려면 다음 단계를 따르세요. 1. 피드 요청을 보낼 때 피드의 <updated> 요소 값을 추적하세요. 1. 쿼리 매개변수 updated-min<updated> 값으로 설정하고 showdeletedtrue로 설정하여 이전 요청 이후 변경된 도메인 공유 연락처만 가져올 수 있습니다.

공유 연락처 1개 가져오기

공유 연락처를 하나만 사용하려면 연락처의 자체 링크를 사용해야 합니다. 공유 연락처 피드에서 연락처 항목을 찾아야만 공유 연락처의 자체 링크를 가져올 수 있습니다. 자체 링크에 사용할 값을 모르는 경우 모든 연락처 가져오기쿼리 매개변수를 사용하여 연락처 가져오기를 참고하세요.

  1. 특정 도메인 공유 연락처를 가져오려면 연락처의 자체 링크로 HTTP GET 요청을 보냅니다.
    GET https://www.google.com/m8/feeds/contacts/DOMAIN/PROJECTION/:SELF_LINK>
    
    다음 내용을 바꿉니다.
  • DOMAIN: 도메인의 URL(예: example.com)
  • PROJECTION: gd:extendedProperty 요소를 지정하는 프로젝션 값입니다. 지원되는 값 목록은 프로젝션 값을 참고하세요.
  • SELF_LINK: 단일 공유 연락처를 나타내는 고유한 숫자 값(예: 12345).

그러면 서버에서 HTTP 200 OK 상태 코드와 연락처가 포함된 항목을 반환합니다.

예를 들어 자체 링크가 https://www.google.com/m8/feeds/contacts/example.com/full/12345로 설정된 도메인 공유 연락처를 가져오려면 다음 HTTP 요청을 전송합니다.

GET https://www.google.com/m8/feeds/contacts/example.com/full/12345

다음 단계