Method: people.getBatchGet
จัดทุกอย่างให้เป็นระเบียบอยู่เสมอด้วยคอลเล็กชัน
บันทึกและจัดหมวดหมู่เนื้อหาตามค่ากำหนดของคุณ
ให้ข้อมูลเกี่ยวกับรายชื่อบุคคลที่เฉพาะเจาะจงโดยระบุรายการชื่อทรัพยากรที่ขอ ใช้ people/me
เพื่อระบุผู้ใช้ที่ตรวจสอบสิทธิ์แล้ว
คำขอจะแสดงข้อผิดพลาด 400 หากไม่ได้ระบุ "personFields"
คำขอ HTTP
GET https://people.googleapis.com/v1/people:batchGet
URL ใช้ไวยากรณ์การแปลง gRPC
พารามิเตอร์การค้นหา
พารามิเตอร์ |
resourceNames[] |
string
ต้องระบุ ชื่อแหล่งข้อมูลของบุคคลที่จะให้ข้อมูล ทำซ้ำได้ พารามิเตอร์การค้นหาของ URL ควรเป็น
resourceNames=<name1>&resourceNames=<name2>&...
- หากต้องการดูข้อมูลเกี่ยวกับผู้ใช้ที่ตรวจสอบสิทธิ์แล้ว ให้ระบุ
people/me
- หากต้องการดูข้อมูลเกี่ยวกับบัญชี Google ให้ระบุ
people/{account_id}
- หากต้องการทราบข้อมูลเกี่ยวกับรายชื่อติดต่อ ให้ระบุชื่อทรัพยากรที่ระบุรายชื่อติดต่อตามที่
people.connections.list แสดง
ชื่อทรัพยากรมีได้สูงสุด 200 ชื่อ
|
requestMask (deprecated) |
object (RequestMask )
เลิกใช้งานแล้ว (โปรดใช้ personFields แทน) มาสก์เพื่อจำกัดผลการค้นหาให้แสดงเฉพาะช่องบุคคลบางส่วน
|
personFields |
string (FieldMask format)
ต้องระบุ หน้ากากฟิลด์เพื่อจํากัดฟิลด์ในบุคคลแต่ละคนที่จะแสดงผล คุณสามารถระบุหลายช่องโดยคั่นด้วยคอมมา ค่าที่ใช้ได้มีดังนี้
- ที่อยู่
- ageRanges
- ชีวประวัติ
- วันเกิด
- calendarUrls
- clientData
- coverPhotos
- emailAddresses
- กิจกรรม
- externalIds
- เพศ
- imClients
- ความสนใจ
- ภาษา
- สถานที่ตั้ง
- ของช่อง
- ข้อมูลเมตา
- miscKeywords
- ชื่อ
- ชื่อเล่น
- อาชีพ
- องค์กร
- phoneNumbers
- รูปภาพ
- ความสัมพันธ์
- sipAddresses
- ทักษะ
- URL
- userDefined
|
sources[] |
enum (ReadSourceType )
ไม่บังคับ มาสก์ของประเภทแหล่งที่มาที่จะแสดงผล ค่าเริ่มต้นคือ READ_SOURCE_TYPE_CONTACT และ READ_SOURCE_TYPE_PROFILE หากไม่ได้ตั้งค่าไว้
|
เนื้อหาของคำขอ
เนื้อหาของคำขอต้องว่างเปล่า
เนื้อหาการตอบกลับ
การตอบกลับคําขอ GET สําหรับรายชื่อบุคคลตามชื่อทรัพยากร
หากทำสำเร็จ เนื้อหาการตอบกลับจะมีข้อมูลซึ่งมีโครงสร้างดังต่อไปนี้
ช่อง |
responses[] |
object (PersonResponse )
การตอบกลับสำหรับชื่อทรัพยากรที่ขอแต่ละรายการ
|
ขอบเขตการให้สิทธิ์
ไม่ต้องมีการให้สิทธิ์เพื่อเข้าถึงข้อมูลสาธารณะ สำหรับข้อมูลส่วนตัว จำเป็นต้องใช้ขอบเขต OAuth รายการใดรายการหนึ่งต่อไปนี้
https://www.googleapis.com/auth/contacts
https://www.googleapis.com/auth/contacts.readonly
https://www.googleapis.com/auth/contacts.other.readonly
https://www.googleapis.com/auth/directory.readonly
https://www.googleapis.com/auth/profile.agerange.read
https://www.googleapis.com/auth/profile.emails.read
https://www.googleapis.com/auth/profile.language.read
https://www.googleapis.com/auth/user.addresses.read
https://www.googleapis.com/auth/user.birthday.read
https://www.googleapis.com/auth/user.emails.read
https://www.googleapis.com/auth/user.gender.read
https://www.googleapis.com/auth/user.organization.read
https://www.googleapis.com/auth/user.phonenumbers.read
https://www.googleapis.com/auth/userinfo.email
https://www.googleapis.com/auth/userinfo.profile
https://www.googleapis.com/auth/profile.language.read
ดูข้อมูลเพิ่มเติมได้ที่คู่มือการให้สิทธิ์
เนื้อหาของหน้าเว็บนี้ได้รับอนุญาตภายใต้ใบอนุญาตที่ต้องระบุที่มาของครีเอทีฟคอมมอนส์ 4.0 และตัวอย่างโค้ดได้รับอนุญาตภายใต้ใบอนุญาต Apache 2.0 เว้นแต่จะระบุไว้เป็นอย่างอื่น โปรดดูรายละเอียดที่นโยบายเว็บไซต์ Google Developers Java เป็นเครื่องหมายการค้าจดทะเบียนของ Oracle และ/หรือบริษัทในเครือ
อัปเดตล่าสุด 2024-11-08 UTC
[[["เข้าใจง่าย","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"]],["อัปเดตล่าสุด 2024-11-08 UTC"],[[["Retrieves information about a list of specific people, including the authenticated user, by specifying resource names."],["Requires the `personFields` query parameter to specify desired data fields and returns a 400 error if it's missing."],["Supports various authorization scopes for accessing private data, although public data requires no authorization."],["Returns a JSON response containing an array of `PersonResponse` objects, each corresponding to a requested resource name."],["Uses the `GET` HTTP method and the `https://people.googleapis.com/v1/people:batchGet` endpoint with gRPC Transcoding syntax."]]],["This outlines how to retrieve information about specific people using the `people:batchGet` endpoint via a `GET` HTTP request. You must provide `resourceNames` (up to 200) in the query, identifying each person (e.g., `people/me` or `people/{account_id}`). The `personFields` parameter is required to specify which person attributes to include. The request body is empty. The response returns an array of `PersonResponse` objects, one for each requested resource name, and requires authorization scopes for private data. A 400 error is returned if 'personFields' are not provided.\n"]]