Method: people.getBatchGet
Tetap teratur dengan koleksi
Simpan dan kategorikan konten berdasarkan preferensi Anda.
Memberikan informasi tentang daftar orang tertentu dengan menentukan daftar nama resource yang diminta. Gunakan people/me
untuk menunjukkan pengguna yang diautentikasi.
Permintaan akan menampilkan error 400 jika 'personFields' tidak ditentukan.
Permintaan HTTP
GET https://people.googleapis.com/v1/people:batchGet
URL menggunakan sintaksis gRPC Transcoding.
Parameter kueri
Parameter |
resourceNames[] |
string
Wajib. Nama resource orang yang informasinya akan diberikan. Tindakan ini dapat diulang. Parameter kueri URL harus
resourceNames=<name1>&resourceNames=<name2>&...
- Untuk mendapatkan informasi tentang pengguna terautentikasi, tentukan
people/me .
- Untuk mendapatkan informasi tentang akun Google, tentukan
people/{account_id} .
- Untuk mendapatkan informasi tentang kontak, tentukan nama resource yang mengidentifikasi kontak seperti yang ditampilkan oleh
people.connections.list .
Maksimum ada 200 nama resource.
|
requestMask (deprecated) |
object (RequestMask )
TIDAK DIGUNAKAN LAGI (Sebagai gantinya, gunakan personFields ) Mask untuk membatasi hasil pada sebagian kolom orang.
|
personFields |
string (FieldMask format)
Wajib. Mask kolom untuk membatasi kolom mana pada setiap orang yang ditampilkan. Beberapa kolom dapat ditentukan dengan memisahkannya dengan koma. Nilai yang valid adalah:
- alamat
- ageRanges
- biografi
- ulang tahun
- calendarUrls
- clientData
- coverPhotos
- emailAddresses
- acara
- externalIds
- gender
- imClients
- minat
- locales
- lokasi
- channel
- metadata
- miscKeywords
- nama
- nama panggilan
- pekerjaan
- organizations
- phoneNumbers
- foto
- hubungan
- sipAddresses
- keterampilan
- Url
- userDefined
|
sources[] |
enum (ReadSourceType )
Opsional. Masker jenis sumber yang akan ditampilkan. Jika tidak ditetapkan, setelan defaultnya adalah READ_SOURCE_TYPE_CONTACT dan READ_SOURCE_TYPE_PROFILE .
|
Isi permintaan
Isi permintaan harus kosong.
Isi respons
Respons terhadap permintaan get untuk daftar orang berdasarkan nama resource.
Jika berhasil, isi respons memuat data dengan struktur berikut:
Kolom |
responses[] |
object (PersonResponse )
Respons untuk setiap nama resource yang diminta.
|
Cakupan otorisasi
Tidak diperlukan otorisasi untuk mengakses data publik. Untuk data pribadi, salah satu cakupan OAuth berikut diperlukan:
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
Untuk informasi selengkapnya, lihat Panduan otorisasi.
Kecuali dinyatakan lain, konten di halaman ini dilisensikan berdasarkan Lisensi Creative Commons Attribution 4.0, sedangkan contoh kode dilisensikan berdasarkan Lisensi Apache 2.0. Untuk mengetahui informasi selengkapnya, lihat Kebijakan Situs Google Developers. Java adalah merek dagang terdaftar dari Oracle dan/atau afiliasinya.
Terakhir diperbarui pada 2024-11-08 UTC.
[[["Mudah dipahami","easyToUnderstand","thumb-up"],["Memecahkan masalah saya","solvedMyProblem","thumb-up"],["Lainnya","otherUp","thumb-up"]],[["Informasi yang saya butuhkan tidak ada","missingTheInformationINeed","thumb-down"],["Terlalu rumit/langkahnya terlalu banyak","tooComplicatedTooManySteps","thumb-down"],["Sudah usang","outOfDate","thumb-down"],["Masalah terjemahan","translationIssue","thumb-down"],["Masalah kode / contoh","samplesCodeIssue","thumb-down"],["Lainnya","otherDown","thumb-down"]],["Terakhir diperbarui pada 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"]]