与参与者合作

本指南介绍了如何使用 Google Meet REST API 获取有关参加过往会议或正在参加会议的参与者的详细信息,以及他们的会话信息。

参与者是指加入通话的人员、使用副屏 模式观看的人员、观看者或 连接到通话的会议室设备。每个人都有一个 participants 资源。

参与者会话 是指为加入 通话的每个参与者设备对创建的唯一会话 ID。每个会话都有一个 participantSessions 资源。如果参与者使用同一参与者设备对多次加入同一通话,则每次都会分配到唯一的会话 ID。

如果您是会议空间所有者或参与者,可以对 participantsparticipantSessions 资源调用 getlist 方法来检索参与者记录。

通过 用户 凭据 进行身份验证和授权后, Google Meet 应用可以访问用户数据并代表经过身份验证的 用户执行操作。通过网域范围内的 委托 进行身份验证后,您可以授权应用的服务账号访问用户的数据 而无需经过每位用户的同意。

参与者

以下部分详细介绍了如何获取会议记录中参与者的相关信息。

participants 资源与 user 字段联合。user 只能是以下对象之一:

  • signedinUser 是以下任一对象:

    • 通过个人计算机、移动设备或副屏模式加入的个人。

    • 会议室设备使用的机器人账号。

  • An anonymousUser 是未登录 Google 账号的未识别用户。

  • A phoneUser 是通过电话拨入的用户,由于他们未登录 Google 账号,因此无法确定其身份。

请注意,虽然这三个对象都会返回 displayName,但 signedinUser 还会返回一个唯一的 user ID,该 ID 可与 Admin SDK API 和 People API 互操作。格式:users/{user}。如需详细了解如何将 user ID 与 People API 搭配使用,请参阅使用 People API 检索参与者详细信息

获取参与者的详细信息

如需获取特定参与者的详细信息,请对 participants 资源使用 get 方法。使用 conferenceRecords/{conferenceRecord}/participants/{participantRecord} 格式设置 name 路径参数。

如果您不知道参与者的姓名,可以使用 list all participant names using the list 方法。

该方法会以 participants 资源的实例形式返回参与者数据。

以下代码示例展示了如何检索特定参与者:

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)

cURL

curl -X GET "https://meet.googleapis.com/v2/conferenceRecords/CONFERENCE_RECORD_NAME/participants/PARTICIPANT_NAME" \
-H "Authorization: Bearer ACCESS_TOKEN"

ACCESS_TOKEN 替换为授予 API 访问权限的访问令牌。

替换以下内容:

  • 会议记录名称,替换为会议记录中特定视频会议 ID 的名称。
  • 参与者名称,替换为会议记录中特定参与者 ID 的名称。

列出所有参与者

如需列出会议记录中所有参与者的详细信息,请对 participants 资源使用 list 方法。使用 conferenceRecords/{conferenceRecord} 格式设置 parent 路径参数。

该方法会以 participants 资源的实例形式返回会议参与者列表,并按 earliestStartTime 降序排列。如需调整页面大小和过滤查询结果,请参阅自定义 分页或过滤参与者列表

以下代码示例展示了如何列出会议记录中的所有参与者:

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)

cURL

curl -X GET "https://meet.googleapis.com/v2/conferenceRecords/PARENT_NAME/participants" \
-H "Authorization: Bearer ACCESS_TOKEN"

ACCESS_TOKEN 替换为授予 API 访问权限的访问令牌。

将父级名称替换为会议记录中特定视频会议 ID 的名称。

自定义分页或过滤参与者列表

传递以下查询参数,以自定义参与者的分页或过滤参与者:

  • pageSize:要返回的参与者人数上限。服务可能会返回小于此值的结果。如果未指定,则最多返回 100 位参与者。最大值为 250;如果值超过 250,系统会自动将其更改为 250。

  • pageToken:从之前的列表调用收到的页面令牌。提供此令牌可检索后续页面。

  • filter:可选。查询过滤条件,用于检索 participants 资源结果中的特定项。

    您可以使用 earliestStartTimelatestEndTime 字段来过滤在特定时间之前加入或之后离开的用户。这两个字段都使用 时间戳 格式,采用 RFC 3339 UTC(即“祖鲁时”) 格式,精确到纳秒,最多九个小数位: {year}-{month}-{day}T{hour}:{min}:{sec}[.{frac_sec}]Z。例如:

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

    如需列出现有会议中的所有活跃参与者,请使用 latestEndTime IS NULL

使用 People API 检索参与者详细信息

如需检索参与者的详细信息,请对 People API 中的 people资源使用 get方法。

  1. 使用路径的尾部组件从 participant 资源中提取人员的 ID。例如,如果 participant 资源 值为 conferenceRecords/abc-123/participants/12345,则 People API 的 ID 为 12345

  2. 添加 READ_SOURCE_TYPE_PROFILEREAD_SOURCE_TYPE_CONTACTREAD_SOURCE_TYPE_OTHER_CONTACT ReadSourceType。这样可确保 Google Workspace 组织的内部用户和外部联系人都会包含在响应中。

以下代码示例展示了如何搜索组织个人资料和联系人以查找人员:

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

替换以下内容:

  • PERSON_ID:要查找的人员的 ID。
  • ACCESS_TOKEN:授予对 多个 API 的访问权限的访问令牌。

参与者会话

以下部分详细介绍了如何获取会议记录中参与者的参与者会话的相关信息。

获取参与者会话的详细信息

如需获取特定参与者会话的详细信息,请对 participantSessions 资源使用 get 方法。使用 conferenceRecords/{conferenceRecord}/participants/{participantRecord}/participantSessions/{participantSessionRecord} 格式设置 name 路径参数。

如果您不知道参与者会话名称,可以使用 列出参与者的所有参与者 会话 using the list 方法。

该方法会以 participantSessions 资源的实例形式返回参与者名称。

以下代码示例展示了如何检索特定参与者会话:

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)

cURL

curl -X GET "https://meet.googleapis.com/v2/conferenceRecords/CONFERENCE_RECORD_NAME/participants/PARTICIPANT_NAME/participantSessions/PARTICIPANT_SESSION_ID" \
-H "Authorization: Bearer ACCESS_TOKEN"

ACCESS_TOKEN 替换为授予 API 访问权限的访问令牌。

替换以下内容:

  • 会议记录名称,替换为会议记录中特定视频会议 ID 的名称。
  • 参与者名称,替换为会议记录中特定参与者 ID 的名称。
  • 参与者会话 ID,替换为特定参与者会话的 ID。

列出所有参与者会话

如需列出会议 记录中参与者的所有参与者会话的详细信息,请对 list() 资源使用 participantSessions 方法。使用 conferenceRecords/{conferenceRecord}/participants/{participantRecord} 格式设置 parent 路径参数。

该方法会以 participantSession 资源的实例形式返回参与者会话列表,并按 startTime 降序排列。如需调整 页面大小和过滤查询结果,请参阅自定义分页或过滤 参与者会话列表

以下代码示例展示了如何列出会议记录中的所有参与者会话:

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 2026 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)

cURL

curl -X GET "https://meet.googleapis.com/v2/conferenceRecords/CONFERENCE_RECORD_NAME/participants/PARENT_NAME/participantSessions" \
-H "Authorization: Bearer ACCESS_TOKEN"

ACCESS_TOKEN 替换为授予 API 访问权限的访问令牌。

替换以下内容:

  • 会议记录名称,替换为会议记录中特定视频会议 ID 的名称。
  • 父级名称,替换为会议记录中参与者的参与者会话的名称。

自定义分页或过滤参与者会话列表

传递以下可选查询参数,以自定义参与者会话的分页或过滤参与者会话:

  • pageSize:要返回的参与者会话数上限。服务可能会返回小于此值的结果。如果未指定,则最多返回 100 个参与者会话。最大值为 250;如果值超过 250,系统会自动将其更改为 250。

  • pageToken:从之前的列表调用收到的页面令牌。提供此令牌可检索后续页面。

  • filter:可选。查询过滤条件,用于检索 participants 资源结果中的特定项。

    您可以使用 startTimeendTime 字段来过滤在特定时间之前加入或之后离开的用户。这两个字段都使用 时间戳 格式,采用 RFC 3339 UTC(即“祖鲁时”) 格式,精确到纳秒,最多九个小数位: {year}-{month}-{day}T{hour}:{min}:{sec}[.{frac_sec}]Z。例如:

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

    如需列出会议记录中的所有活跃参与者会话,请使用 endTime IS NULL