Domain Shared Contacts API ช่วยให้แอปพลิเคชันของคุณได้รับและอัปเดตรายชื่อติดต่อภายนอกที่แชร์กับผู้ใช้ทุกคนในโดเมน Google Workspace ได้ รายชื่อติดต่อที่แชร์จะปรากฏต่อผู้ใช้ทุกคนของโดเมน Google Workspace และบริการทั้งหมดของ Google จะมีสิทธิ์เข้าถึงรายชื่อติดต่อ
แอปพลิเคชันของคุณสามารถใช้ Domain Shared Contacts API เพื่อสร้างรายชื่อติดต่อที่แชร์ แก้ไข หรือลบรายชื่อติดต่อที่แชร์ที่มีอยู่ และค้นหารายชื่อติดต่อที่แชร์ซึ่งตรงกับเกณฑ์ที่เฉพาะเจาะจง
Domain Shared Contacts API ใช้ได้กับบัญชี Google Workspace เท่านั้น
หากต้องการใช้ API ให้เปิดใช้ Domain Shared Contacts API ในคอนโซลผู้ดูแลระบบ
การเปลี่ยนแปลงรายชื่อติดต่อที่แชร์อาจใช้เวลาถึง 24 ชั่วโมงจึงจะปรากฏในการเติมอีเมลอัตโนมัติและเครื่องมือจัดการรายชื่อติดต่อ
นอกจากข้อมูลเบื้องต้นเกี่ยวกับความสามารถของ API รายชื่อติดต่อที่แชร์ในโดเมนแล้ว เอกสารนี้ยังมีตัวอย่างเกี่ยวกับวิธีจัดการรายชื่อติดต่อโดยใช้ XML และ HTTP ด้วย หลังจากอ่านเอกสารนี้แล้ว คุณสามารถดูข้อมูลเพิ่มเติมเกี่ยวกับการโต้ตอบกับ API โดยใช้ไลบรารีของไคลเอ็นต์
ผู้ชม
เอกสารนี้มีไว้สำหรับนักพัฒนาซอฟต์แวร์ที่เขียนแอปพลิเคชันไคลเอ็นต์ซึ่งสามารถจัดการรายชื่อติดต่อของ Google โดยใช้ HTTP และ XML
เอกสารนี้ถือว่าคุณเข้าใจพื้นฐานที่อยู่เบื้องหลังโปรโตคอล Google Data API
Domain Shared Contacts API เวอร์ชันนี้เป็นไปตามหลักการของ Google Data API
Google Data API อิงตามทั้งรูปแบบการเผยแพร่ Atom 1.0 และ RSS 2.0 นอกเหนือจากโปรโตคอลการเผยแพร่ Atom
ระบุเวอร์ชัน
คำขอทั้งหมดที่คุณส่งโดยใช้ Domain Shared Contacts API ควรระบุ API เวอร์ชัน 3.0 ดังนี้
[[["เข้าใจง่าย","easyToUnderstand","thumb-up"],["แก้ปัญหาของฉันได้","solvedMyProblem","thumb-up"],["อื่นๆ","otherUp","thumb-up"]],[["ไม่มีข้อมูลที่ฉันต้องการ","missingTheInformationINeed","thumb-down"],["ซับซ้อนเกินไป/มีหลายขั้นตอนมากเกินไป","tooComplicatedTooManySteps","thumb-down"],["ล้าสมัย","outOfDate","thumb-down"],["ปัญหาเกี่ยวกับการแปล","translationIssue","thumb-down"],["ตัวอย่าง/ปัญหาเกี่ยวกับโค้ด","samplesCodeIssue","thumb-down"],["อื่นๆ","otherDown","thumb-down"]],["อัปเดตล่าสุด 2025-03-25 UTC"],[],[],null,["# Domain Shared Contacts API overview\n\nThe Domain Shared Contacts API lets your applications get and update external\ncontacts that are shared with all users in a Google Workspace domain. Shared\ncontacts are visible to all users of a Google Workspace domain and all Google\nservices have access to the contact list.\n| **Warning:** The Domain Shared Contacts API is intended only for *external* contacts. Using this API to create contact information for domain (internal) users or groups can result in duplicate contact information for those users and groups, which might lead to unexpected behavior. To get and update Google Workspace domain (internal) users' contact information, use the [Directory API](https://developers.google.com/workspace/admin/directory) instead.\n\nYour application can use the Domain Shared Contacts API to create shared contacts, edit\nor delete existing shared contacts, and query for shared contacts that match a\nparticular criteria.\n\nThe Domain Shared Contacts API is only available to Google Workspace accounts.\nTo use the API,\n[enable the Domain Shared Contacts API in the Admin console](https://support.google.com/a/answer/60757).\nShared contact changes can take up to 24 hours to be reflected in the email\naddress autocomplete and the contact manager.\n\nIn addition to providing background on the capabilities of the\nDomain Shared Contacts API, this document offers examples about how to manage\ncontacts by using XML and HTTP. After reading this document, you can learn more\nabout interacting with the API by using our\n[client libraries](https://developers.google.com/api-client-library).\n\nAudience\n--------\n\nThis document is intended for developers who want to write client applications\nthat can manipulate Google's contact lists by using HTTP and XML.\nThis document assumes that you understand the\n[fundamentals behind the Google Data APIs protocol](https://developers.google.com/gdata/docs/2.0/basics).\n\nIf you're using a UNIX operating system and you want to try the examples in this\ndocument without writing any code, use the UNIX command-line utilities\n[curl](https://curl.haxx.se/)\nor\n[wget](https://www.gnu.org/software/wget/).\nLearn how to\n[use cURL with Google Data services](https://developers.google.com/gdata/articles/using_cURL).\n\nPrinciples\n----------\n\nThis version of the Domain Shared Contacts API follows the principles of the\n[Google Data APIs](https://developers.google.com/gdata/docs/developers-guide).\nGoogle Data APIs are based on both the Atom 1.0 and RSS 2.0 syndication formats\nin addition to the Atom Publishing Protocol.\n\nSpecify a version\n-----------------\n\nEvery request that you send using the Domain Shared Contacts API should specify version\n3.0 of the API: \n\n GData-Version: 3.0\n\nIf you can't set HTTP headers, you can specify`v=3.0` as a query parameter in\nthe URL, but the HTTP header method is recommended.\n| **Note:** The client libraries supply appropriate version headers automatically, so don't use the `v=3.0` query parameter when you're using a client library."]]