Bekerja sama dengan peserta

Panduan ini menjelaskan cara mendapatkan detail tentang peserta yang menghadiri konferensi terdahulu atau yang berada dalam konferensi aktif, beserta info sesi mereka, menggunakan Google Meet REST API.

Peserta adalah orang yang bergabung ke panggilan atau yang menggunakan mode Pendamping, menonton sebagai penonton, atau perangkat ruang yang terhubung ke panggilan. Ada satu resource participants untuk setiap orang.

Sesi peserta adalah ID sesi unik yang dibuat untuk setiap pasangan peserta-perangkat yang bergabung ke panggilan. Ada satu resource participantSessions untuk setiap sesi. Jika peserta bergabung ke panggilan yang sama beberapa kali dari pasangan peserta-perangkat yang sama, setiap peserta akan diberi ID sesi unik.

Jika Anda adalah pemilik atau peserta ruang rapat, Anda dapat memanggil metode get() dan list() pada resource participants dan participantSessions untuk mengambil data peserta.

Dengan mengautentikasi dan memberikan otorisasi menggunakan kredensial pengguna, aplikasi Google Meet dapat mengakses data pengguna dan melakukan operasi atas nama pengguna yang diautentikasi. Dengan melakukan autentikasi menggunakan delegasi tingkat domain, Anda dapat memberikan otorisasi kepada akun layanan aplikasi untuk mengakses data pengguna tanpa mewajibkan setiap pengguna memberikan izin.

Peserta

Bagian berikut menjelaskan cara mendapatkan informasi tentang peserta dalam data konferensi.

Penyatuan resource participants dengan kolom user. user hanya dapat berupa salah satu objek berikut:

  • signedinUser adalah:

    • Individu yang bergabung dari komputer pribadi, perangkat seluler, atau melalui mode Pendamping.

    • Akun robot yang digunakan oleh perangkat ruang konferensi.

  • anonymousUser adalah pengguna yang tidak teridentifikasi yang tidak login ke Akun Google.

  • phoneUser adalah pengguna yang bergabung melalui telepon dengan identitas yang tidak diketahui karena mereka belum login dengan Akun Google.

Perhatikan bahwa meskipun ketiga objek menampilkan displayName, signedinUser juga menampilkan ID user unik yang dapat dioperasikan secara bersama dengan Admin SDK API dan People API. Format: users/{user}. Untuk informasi selengkapnya tentang penggunaan ID user dengan People API, lihat Mengambil detail peserta dengan People API.

Mendapatkan detail tentang peserta

Untuk mendapatkan detail tentang peserta tertentu, gunakan metode get() di resource participants dengan parameter jalur name. Jika tidak mengetahui nama peserta, Anda dapat mencantumkan semua nama peserta menggunakan metode list().

Metode ini menampilkan data peserta sebagai instance resource participants.

Contoh kode berikut menunjukkan cara mengambil peserta tertentu:

Java

java-meet/samples/snippets/generated/com/google/apps/meet/v2/conferencerecordsservice/getparticipant/AsyncGetParticipant.java
import com.google.api.core.ApiFuture;
import com.google.apps.meet.v2.ConferenceRecordsServiceClient;
import com.google.apps.meet.v2.GetParticipantRequest;
import com.google.apps.meet.v2.Participant;
import com.google.apps.meet.v2.ParticipantName;

public class AsyncGetParticipant {

  public static void main(String[] args) throws Exception {
    asyncGetParticipant();
  }

  public static void asyncGetParticipant() throws Exception {
    // This snippet has been automatically generated and should be regarded as a code template only.
    // It will require modifications to work:
    // - It may require correct/in-range values for request initialization.
    // - It may require specifying regional endpoints when creating the service client as shown in
    // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
    try (ConferenceRecordsServiceClient conferenceRecordsServiceClient =
        ConferenceRecordsServiceClient.create()) {
      GetParticipantRequest request =
          GetParticipantRequest.newBuilder()
              .setName(ParticipantName.of("[CONFERENCE_RECORD]", "[PARTICIPANT]").toString())
              .build();
      ApiFuture<Participant> future =
          conferenceRecordsServiceClient.getParticipantCallable().futureCall(request);
      // Do something.
      Participant response = future.get();
    }
  }
}

Node.js

packages/google-apps-meet/samples/generated/v2/conference_records_service.get_participant.js
/**
 * This snippet has been automatically generated and should be regarded as a code template only.
 * It will require modifications to work.
 * It may require correct/in-range values for request initialization.
 * TODO(developer): Uncomment these variables before running the sample.
 */
/**
 *  Required. Resource name of the participant.
 */
// const name = 'abc123'

// Imports the Meet library
const {ConferenceRecordsServiceClient} = require('@google-apps/meet').v2;

// Instantiates a client
const meetClient = new ConferenceRecordsServiceClient();

async function callGetParticipant() {
  // Construct request
  const request = {
    name,
  };

  // Run request
  const response = await meetClient.getParticipant(request);
  console.log(response);
}

callGetParticipant();

Python

packages/google-apps-meet/samples/generated_samples/meet_v2_generated_conference_records_service_get_participant_async.py
# This snippet has been automatically generated and should be regarded as a
# code template only.
# It will require modifications to work:
# - It may require correct/in-range values for request initialization.
# - It may require specifying regional endpoints when creating the service
#   client as shown in:
#   https://googleapis.dev/python/google-api-core/latest/client_options.html
from google.apps import meet_v2


async def sample_get_participant():
    # Create a client
    client = meet_v2.ConferenceRecordsServiceAsyncClient()

    # Initialize request argument(s)
    request = meet_v2.GetParticipantRequest(
        name="name_value",
    )

    # Make the request
    response = await client.get_participant(request=request)

    # Handle the response
    print(response)

Ganti nama peserta dengan nama ID peserta tertentu dalam data konferensi.

Mencantumkan semua peserta

Untuk mencantumkan detail tentang semua peserta dalam data konferensi, gunakan metode list() pada resource participants dengan parameter jalur parent. Format: conferenceRecords/{conferenceRecord}.

Metode ini menampilkan daftar peserta konferensi, yang diurutkan berdasarkan earliestStartTime dalam urutan menurun, sebagai instance resource participants. Untuk menyesuaikan ukuran halaman dan memfilter hasil kueri, lihat Menyesuaikan pembagian halaman atau memfilter daftar peserta.

Contoh kode berikut menunjukkan cara mencantumkan semua peserta dalam rekaman konferensi:

Java

java-meet/samples/snippets/generated/com/google/apps/meet/v2/conferencerecordsservice/listparticipants/AsyncListParticipants.java
import com.google.api.core.ApiFuture;
import com.google.apps.meet.v2.ConferenceRecordName;
import com.google.apps.meet.v2.ConferenceRecordsServiceClient;
import com.google.apps.meet.v2.ListParticipantsRequest;
import com.google.apps.meet.v2.Participant;

public class AsyncListParticipants {

  public static void main(String[] args) throws Exception {
    asyncListParticipants();
  }

  public static void asyncListParticipants() throws Exception {
    // This snippet has been automatically generated and should be regarded as a code template only.
    // It will require modifications to work:
    // - It may require correct/in-range values for request initialization.
    // - It may require specifying regional endpoints when creating the service client as shown in
    // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
    try (ConferenceRecordsServiceClient conferenceRecordsServiceClient =
        ConferenceRecordsServiceClient.create()) {
      ListParticipantsRequest request =
          ListParticipantsRequest.newBuilder()
              .setParent(ConferenceRecordName.of("[CONFERENCE_RECORD]").toString())
              .setPageSize(883849137)
              .setPageToken("pageToken873572522")
              .setFilter("filter-1274492040")
              .build();
      ApiFuture<Participant> future =
          conferenceRecordsServiceClient.listParticipantsPagedCallable().futureCall(request);
      // Do something.
      for (Participant element : future.get().iterateAll()) {
        // doThingsWith(element);
      }
    }
  }
}

Node.js

packages/google-apps-meet/samples/generated/v2/conference_records_service.list_participants.js
/**
 * This snippet has been automatically generated and should be regarded as a code template only.
 * It will require modifications to work.
 * It may require correct/in-range values for request initialization.
 * TODO(developer): Uncomment these variables before running the sample.
 */
/**
 *  Required. Format: `conferenceRecords/{conference_record}`
 */
// const parent = 'abc123'
/**
 *  Maximum number of participants to return. The service might return fewer
 *  than this value.
 *  If unspecified, at most 100 participants are returned.
 *  The maximum value is 250; values above 250 are coerced to 250.
 *  Maximum might change in the future.
 */
// const pageSize = 1234
/**
 *  Page token returned from previous List Call.
 */
// const pageToken = 'abc123'
/**
 *  Optional. User specified filtering condition in EBNF
 *  format (https://en.wikipedia.org/wiki/Extended_Backus%E2%80%93Naur_form).
 *  The following are the filterable fields:
 *  * `earliest_start_time`
 *  * `latest_end_time`
 *  For example, `latest_end_time IS NULL` returns active participants in
 *  the conference.
 */
// const filter = 'abc123'

// Imports the Meet library
const {ConferenceRecordsServiceClient} = require('@google-apps/meet').v2;

// Instantiates a client
const meetClient = new ConferenceRecordsServiceClient();

async function callListParticipants() {
  // Construct request
  const request = {
    parent,
  };

  // Run request
  const iterable = meetClient.listParticipantsAsync(request);
  for await (const response of iterable) {
      console.log(response);
  }
}

callListParticipants();

Python

packages/google-apps-meet/samples/generated_samples/meet_v2_generated_conference_records_service_list_participants_async.py
# This snippet has been automatically generated and should be regarded as a
# code template only.
# It will require modifications to work:
# - It may require correct/in-range values for request initialization.
# - It may require specifying regional endpoints when creating the service
#   client as shown in:
#   https://googleapis.dev/python/google-api-core/latest/client_options.html
from google.apps import meet_v2


async def sample_list_participants():
    # Create a client
    client = meet_v2.ConferenceRecordsServiceAsyncClient()

    # Initialize request argument(s)
    request = meet_v2.ListParticipantsRequest(
        parent="parent_value",
    )

    # Make the request
    page_result = client.list_participants(request=request)

    # Handle the response
    async for response in page_result:
        print(response)

Ganti nilai induk dengan nama data konferensi.

Menyesuaikan penomoran halaman atau memfilter daftar peserta

Teruskan parameter kueri berikut untuk menyesuaikan penomoran halaman, atau memfilter, peserta:

  • pageSize: Jumlah maksimum peserta yang akan ditampilkan. Layanan mungkin menampilkan lebih sedikit dari nilai ini. Jika tidak ditentukan, maksimal 100 peserta akan ditampilkan. Nilai maksimumnya adalah 250; nilai yang lebih dari 250 akan otomatis berubah menjadi 250.

  • pageToken: Token halaman, diterima dari panggilan daftar sebelumnya. Berikan token ini untuk mengambil halaman berikutnya.

  • filter: Opsional. Filter kueri untuk mengambil item tertentu dalam hasil resource participants.

    Anda dapat menggunakan kolom earliestStartTime atau latestEndTime untuk memfilter pengguna yang bergabung sebelum atau keluar setelah waktu tertentu. Kedua kolom menggunakan format Stempel Waktu dalam format UTC "Zulu" RFC 3339, dengan resolusi nanodetik dan hingga sembilan digit pecahan: {year}-{month}-{day}T{hour}:{min}:{sec}[.{frac_sec}]Z. Contoh:

    • earliestStartTime < 2023-10-01T15:01:23Z
    • latestEndTime < 2023-10-01T15:01:23Z

    Untuk mencantumkan semua peserta aktif dalam konferensi yang ada, gunakan latestEndTime IS NULL.

Mengambil detail peserta dengan People API

Untuk mengambil detail tentang peserta, gunakan metode get() pada resource people di People API.

  1. Ekstrak ID orang dari resource participant menggunakan komponen akhir jalur. Misalnya, jika nilai resource participant adalah conferenceRecords/abc-123/participants/12345, ID untuk People API adalah 12345.

  2. Sertakan READ_SOURCE_TYPE_PROFILE, READ_SOURCE_TYPE_CONTACT, dan READ_SOURCE_TYPE_OTHER_CONTACT ReadSourceType. Tindakan ini memastikan pengguna internal di organisasi Google Workspace dan kontak eksternal disertakan dalam respons.

Contoh kode berikut menunjukkan cara menelusuri profil organisasi dan kontak untuk seseorang:

cURL

curl \
   'https://people.googleapis.com/v1/people/PERSON_ID?personFields=names%2CemailAddresses&sources=READ_SOURCE_TYPE_OTHER_CONTACT&sources=READ_SOURCE_TYPE_PROFILE&sources=READ_SOURCE_TYPE_CONTACT' \
   --header 'Authorization: Bearer ACCESS_TOKEN' \
   --header 'Accept: application/json' \
   --compressed

Ganti kode berikut:

  • PERSON_ID: ID orang yang akan ditemukan.
  • ACCESS_TOKEN: token akses yang memberikan akses ke beberapa API.

Sesi peserta

Bagian berikut menjelaskan cara mendapatkan informasi tentang sesi peserta dari peserta dalam data konferensi.

Mendapatkan detail tentang sesi peserta

Untuk mendapatkan detail tentang sesi peserta tertentu, gunakan metode get() di resource participantSessions dengan parameter jalur name. Jika tidak mengetahui nama sesi peserta, Anda dapat mencantumkan semua sesi peserta dari peserta menggunakan metode list().

Metode ini menampilkan nama peserta sebagai instance resource participantSessions.

Contoh kode berikut menunjukkan cara mengambil sesi peserta tertentu:

Java

java-meet/samples/snippets/generated/com/google/apps/meet/v2/conferencerecordsservice/getparticipantsession/AsyncGetParticipantSession.java
import com.google.api.core.ApiFuture;
import com.google.apps.meet.v2.ConferenceRecordsServiceClient;
import com.google.apps.meet.v2.GetParticipantSessionRequest;
import com.google.apps.meet.v2.ParticipantSession;
import com.google.apps.meet.v2.ParticipantSessionName;

public class AsyncGetParticipantSession {

  public static void main(String[] args) throws Exception {
    asyncGetParticipantSession();
  }

  public static void asyncGetParticipantSession() throws Exception {
    // This snippet has been automatically generated and should be regarded as a code template only.
    // It will require modifications to work:
    // - It may require correct/in-range values for request initialization.
    // - It may require specifying regional endpoints when creating the service client as shown in
    // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
    try (ConferenceRecordsServiceClient conferenceRecordsServiceClient =
        ConferenceRecordsServiceClient.create()) {
      GetParticipantSessionRequest request =
          GetParticipantSessionRequest.newBuilder()
              .setName(
                  ParticipantSessionName.of(
                          "[CONFERENCE_RECORD]", "[PARTICIPANT]", "[PARTICIPANT_SESSION]")
                      .toString())
              .build();
      ApiFuture<ParticipantSession> future =
          conferenceRecordsServiceClient.getParticipantSessionCallable().futureCall(request);
      // Do something.
      ParticipantSession response = future.get();
    }
  }
}

Node.js

packages/google-apps-meet/samples/generated/v2/conference_records_service.get_participant_session.js
/**
 * This snippet has been automatically generated and should be regarded as a code template only.
 * It will require modifications to work.
 * It may require correct/in-range values for request initialization.
 * TODO(developer): Uncomment these variables before running the sample.
 */
/**
 *  Required. Resource name of the participant.
 */
// const name = 'abc123'

// Imports the Meet library
const {ConferenceRecordsServiceClient} = require('@google-apps/meet').v2;

// Instantiates a client
const meetClient = new ConferenceRecordsServiceClient();

async function callGetParticipantSession() {
  // Construct request
  const request = {
    name,
  };

  // Run request
  const response = await meetClient.getParticipantSession(request);
  console.log(response);
}

callGetParticipantSession();

Python

packages/google-apps-meet/samples/generated_samples/meet_v2_generated_conference_records_service_get_participant_session_async.py
# This snippet has been automatically generated and should be regarded as a
# code template only.
# It will require modifications to work:
# - It may require correct/in-range values for request initialization.
# - It may require specifying regional endpoints when creating the service
#   client as shown in:
#   https://googleapis.dev/python/google-api-core/latest/client_options.html
from google.apps import meet_v2


async def sample_get_participant_session():
    # Create a client
    client = meet_v2.ConferenceRecordsServiceAsyncClient()

    # Initialize request argument(s)
    request = meet_v2.GetParticipantSessionRequest(
        name="name_value",
    )

    # Make the request
    response = await client.get_participant_session(request=request)

    # Handle the response
    print(response)

Ganti nama peserta dengan nama ID sesi peserta tertentu dalam sesi peserta.

Mencantumkan semua sesi peserta

Untuk mencantumkan detail tentang semua sesi peserta dari peserta dalam rekaman konferensi, gunakan metode list() di resource participantSessions dengan parameter jalur parent. Format: conferenceRecords/{conferenceRecord}/participants/{participant}.

Metode ini menampilkan daftar sesi peserta, yang diurutkan menurut startTime dalam urutan menurun, sebagai instance resource participantSession. Untuk menyesuaikan ukuran halaman dan memfilter hasil kueri, lihat Menyesuaikan penomoran halaman atau memfilter daftar sesi peserta.

Contoh kode berikut menunjukkan cara mencantumkan semua sesi peserta dalam data konferensi:

Java

java-meet/samples/snippets/generated/com/google/apps/meet/v2/conferencerecordsservice/listparticipantsessions/AsyncListParticipantSessions.java
import com.google.api.core.ApiFuture;
import com.google.apps.meet.v2.ConferenceRecordsServiceClient;
import com.google.apps.meet.v2.ListParticipantSessionsRequest;
import com.google.apps.meet.v2.ParticipantName;
import com.google.apps.meet.v2.ParticipantSession;

public class AsyncListParticipantSessions {

  public static void main(String[] args) throws Exception {
    asyncListParticipantSessions();
  }

  public static void asyncListParticipantSessions() throws Exception {
    // This snippet has been automatically generated and should be regarded as a code template only.
    // It will require modifications to work:
    // - It may require correct/in-range values for request initialization.
    // - It may require specifying regional endpoints when creating the service client as shown in
    // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
    try (ConferenceRecordsServiceClient conferenceRecordsServiceClient =
        ConferenceRecordsServiceClient.create()) {
      ListParticipantSessionsRequest request =
          ListParticipantSessionsRequest.newBuilder()
              .setParent(ParticipantName.of("[CONFERENCE_RECORD]", "[PARTICIPANT]").toString())
              .setPageSize(883849137)
              .setPageToken("pageToken873572522")
              .setFilter("filter-1274492040")
              .build();
      ApiFuture<ParticipantSession> future =
          conferenceRecordsServiceClient.listParticipantSessionsPagedCallable().futureCall(request);
      // Do something.
      for (ParticipantSession element : future.get().iterateAll()) {
        // doThingsWith(element);
      }
    }
  }
}

Node.js

packages/google-apps-meet/samples/generated/v2/conference_records_service.list_participant_sessions.js
// Copyright 2025 Google LLC
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
//     https://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
//
// ** This file is automatically generated by gapic-generator-typescript. **
// ** https://github.com/googleapis/gapic-generator-typescript **
// ** All changes to this file may be overwritten. **



'use strict';

function main(parent) {
  /**
   * This snippet has been automatically generated and should be regarded as a code template only.
   * It will require modifications to work.
   * It may require correct/in-range values for request initialization.
   * TODO(developer): Uncomment these variables before running the sample.
   */
  /**
   *  Required. Format:
   *  `conferenceRecords/{conference_record}/participants/{participant}`
   */
  // const parent = 'abc123'
  /**
   *  Optional. Maximum number of participant sessions to return. The service
   *  might return fewer than this value. If unspecified, at most 100
   *  participants are returned. The maximum value is 250; values above 250 are
   *  coerced to 250. Maximum might change in the future.
   */
  // const pageSize = 1234
  /**
   *  Optional. Page token returned from previous List Call.
   */
  // const pageToken = 'abc123'
  /**
   *  Optional. User specified filtering condition in EBNF
   *  format (https://en.wikipedia.org/wiki/Extended_Backus%E2%80%93Naur_form).
   *  The following are the filterable fields:
   *  * `start_time`
   *  * `end_time`
   *  For example, `end_time IS NULL` returns active participant sessions in
   *  the conference record.
   */
  // const filter = 'abc123'

  // Imports the Meet library
  const {ConferenceRecordsServiceClient} = require('@google-apps/meet').v2;

  // Instantiates a client
  const meetClient = new ConferenceRecordsServiceClient();

  async function callListParticipantSessions() {
    // Construct request
    const request = {
      parent,
    };

    // Run request
    const iterable = meetClient.listParticipantSessionsAsync(request);
    for await (const response of iterable) {
        console.log(response);
    }
  }

  callListParticipantSessions();
}

process.on('unhandledRejection', err => {
  console.error(err.message);
  process.exitCode = 1;
});
main(...process.argv.slice(2));

Python

packages/google-apps-meet/samples/generated_samples/meet_v2_generated_conference_records_service_list_participant_sessions_async.py
# This snippet has been automatically generated and should be regarded as a
# code template only.
# It will require modifications to work:
# - It may require correct/in-range values for request initialization.
# - It may require specifying regional endpoints when creating the service
#   client as shown in:
#   https://googleapis.dev/python/google-api-core/latest/client_options.html
from google.apps import meet_v2


async def sample_list_participant_sessions():
    # Create a client
    client = meet_v2.ConferenceRecordsServiceAsyncClient()

    # Initialize request argument(s)
    request = meet_v2.ListParticipantSessionsRequest(
        parent="parent_value",
    )

    # Make the request
    page_result = client.list_participant_sessions(request=request)

    # Handle the response
    async for response in page_result:
        print(response)

Ganti nilai induk dengan nama sesi peserta dari peserta dalam data konferensi.

Menyesuaikan penomoran halaman atau memfilter daftar sesi peserta

Teruskan parameter kueri opsional berikut untuk menyesuaikan penomoran halaman, atau memfilter, sesi peserta:

  • pageSize: Jumlah maksimum sesi peserta yang akan ditampilkan. Layanan mungkin menampilkan lebih sedikit dari nilai ini. Jika tidak ditentukan, maksimal 100 sesi peserta akan ditampilkan. Nilai maksimumnya adalah 250; nilai lebih dari 250 akan otomatis diubah menjadi 250.

  • pageToken: Token halaman, diterima dari panggilan daftar sebelumnya. Berikan token ini untuk mengambil halaman berikutnya.

  • filter: Opsional. Filter kueri untuk mengambil item tertentu dalam hasil resource participants.

    Anda dapat menggunakan kolom startTime atau endTime untuk memfilter pengguna yang bergabung sebelum atau keluar setelah waktu tertentu. Kedua kolom menggunakan format Stempel Waktu dalam format UTC "Zulu" RFC 3339, dengan resolusi nanodetik dan hingga sembilan digit pecahan: {year}-{month}-{day}T{hour}:{min}:{sec}[.{frac_sec}]Z. Contoh:

    • startTime < 2023-10-01T15:01:23Z
    • endTime < 2023-10-01T15:01:23Z

    Untuk mencantumkan semua sesi peserta aktif dalam data konferensi, gunakan endTime IS NULL.