Trabalhar com os participantes

Este guia explica como conferir detalhes sobre os participantes que compareceram a uma conferência anterior ou que estão em uma conferência ativa, além das informações da sessão, usando a API REST do Google Meet.

Um participante é uma pessoa que entrou em uma chamada ou que usa o modo companion, assistindo como espectador ou um dispositivo de sala conectado a uma chamada. Há um recurso participants para cada pessoa.

Uma sessão de participante é um ID de sessão exclusivo criado para cada par de participante-dispositivo que entra em uma chamada. Há um recurso participantSessions para cada sessão. Se o participante entrar na mesma chamada várias vezes do mesmo par de participante-dispositivo, cada um deles receberá IDs de sessão exclusivos.

Se você for proprietário ou participante do espaço de reunião, poderá chamar os métodos get() e list() nos recursos participants e participantSessions para extrair os registros dos participantes.

A autenticação e autorização com credenciais do usuário permite que os apps do Google Meet acessem dados do usuário e realizem operações em nome do usuário autenticado. A autenticação com a delegação em todo o domínio permite autorizar a conta de serviço de um aplicativo a acessar os dados dos seus usuários sem precisar de consentimento.

Participantes

As seções a seguir detalham como receber informações sobre os participantes em um registro de conferência.

O recurso participants é unificado com o campo user. Um user pode ser apenas um dos seguintes objetos:

  • Um signedinUser pode ser:

    • Uma pessoa que participa de um computador pessoal, um dispositivo móvel ou pelo modo Companion.

    • Uma conta de robô usada por dispositivos de sala de conferências.

  • Um anonymousUser é um usuário não identificado que não fez login em uma Conta do Google.

  • Um phoneUser é um usuário que está ligando de um telefone em que a identidade é desconhecida porque ele não fez login com uma Conta do Google.

Embora os três objetos retornem um displayName, o signedinUser também retorna um ID user exclusivo que é compatível com a API Admin SDK e a API People. Formato: users/{user}. Para mais informações sobre como usar o ID user com a API People, consulte Extrair detalhes do participante com a API People.

Conferir detalhes sobre um participante

Para conferir detalhes sobre um participante específico, use o método get() no recurso participants com o parâmetro de caminho name. Se você não souber o nome do participante, listar todos os nomes dos participantes usando o método list().

O método retorna dados de participantes como uma instância de um recurso participants.

O exemplo de código a seguir mostra como recuperar um participante específico:

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)

Substitua o nome do participante pelo nome do ID do participante específico em um registro de conferência.

Listar todos os participantes

Para listar detalhes sobre todos os participantes em um registro de conferência, use o método list() no recurso participants com o parâmetro de caminho parent. Formato: conferenceRecords/{conferenceRecord}.

O método retorna uma lista de participantes da conferência, ordenada por earliestStartTime em ordem decrescente, como uma instância de um recurso participants. Para ajustar o tamanho da página e filtrar os resultados da consulta, consulte Personalizar a paginação ou filtrar a lista de participantes.

O exemplo de código abaixo mostra como listar todos os participantes em um registro de conferência:

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)

Substitua o valor pai pelo nome do registro da conferência.

Personalizar a paginação ou filtrar a lista de participantes

Transmita os seguintes parâmetros de consulta para personalizar a paginação ou filtrar participantes:

  • pageSize: o número máximo de participantes a serem retornados. O serviço pode retornar menos que esse valor. Se não for especificado, no máximo 100 participantes serão retornados. O valor máximo é 250. Valores maiores que 250 são automaticamente alterados para 250.

  • pageToken: um token de página recebido de uma chamada de lista anterior. Informe este token para recuperar a página seguinte.

  • filter: opcional. Um filtro de consulta para recuperar itens específicos nos resultados do recurso participants.

    É possível usar os campos earliestStartTime ou latestEndTime para filtrar os usuários que entraram antes ou saíram depois de um determinado período. Ambos os campos usam o formato Carimbo de data/hora no formato UTC "Zulu" RFC 3339, com resolução de nanossegundos e até nove dígitos fracionários: {year}-{month}-{day}T{hour}:{min}:{sec}[.{frac_sec}]Z. Exemplo:

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

    Para listar todos os participantes ativos em uma conferência, use latestEndTime IS NULL.

Extrair detalhes do participante com a API People

Para recuperar detalhes sobre um participante, use o método get() no recurso people na API People.

  1. Extraia o ID da pessoa do recurso participant usando o componente final do caminho. Por exemplo, se o valor do recurso participant for conferenceRecords/abc-123/participants/12345, o ID da API People será 12345.

  2. Inclua READ_SOURCE_TYPE_PROFILE, READ_SOURCE_TYPE_CONTACT e READ_SOURCE_TYPE_OTHER_CONTACT ReadSourceType. Isso garante que os usuários internos de uma organização do Google Workspace e os contatos externos sejam incluídos na resposta.

O exemplo de código abaixo mostra como pesquisar os perfis de organização e os contatos de uma pessoa:

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

Substitua:

  • PERSON_ID: o ID da pessoa a ser encontrada.
  • ACCESS_TOKEN: o token de acesso que concede acesso a várias APIs.

Sessões de participantes

As seções a seguir detalham como receber informações sobre as sessões de um participante em um registro de conferência.

Conferir detalhes sobre uma sessão de participante

Para conferir detalhes sobre uma sessão de participante específica, use o método get() no recurso participantSessions com o parâmetro de caminho name. Se você não souber o nome da sessão do participante, listar todas as sessões de um participante usando o método list().

O método retorna um nome de participante como uma instância de um recurso participantSessions.

O exemplo de código abaixo mostra como recuperar uma sessão de participante específica:

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)

Substitua o nome do participante pelo nome do ID da sessão do participante específico em uma sessão de participante.

Listar todas as sessões de participantes

Para listar detalhes sobre todas as sessões de um participante em um registro de conferência, use o método list() no recurso participantSessions com o parâmetro de caminho parent. Formato: conferenceRecords/{conferenceRecord}/participants/{participant}.

O método retorna uma lista de sessões de participantes, ordenadas por startTime em ordem decrescente, como uma instância de um recurso participantSession. Para ajustar o tamanho da página e filtrar os resultados da consulta, consulte Personalizar paginação ou filtrar a lista de sessões de participantes.

O exemplo de código abaixo mostra como listar todas as sessões de participantes em um registro de conferência:

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)

Substitua o valor pai pelo nome das sessões de um participante em um registro de conferência.

Personalizar a paginação ou filtrar a lista de sessões de participantes

Transmita os seguintes parâmetros de consulta opcionais para personalizar a paginação ou filtrar as sessões de participantes:

  • pageSize: o número máximo de sessões de participante a serem retornadas. O serviço pode retornar menos que esse valor. Se não for especificado, no máximo 100 sessões de participantes serão retornadas. O valor máximo é 250. Valores maiores que 250 são alterados automaticamente para 250.

  • pageToken: um token de página recebido de uma chamada de lista anterior. Informe este token para recuperar a página seguinte.

  • filter: opcional. Um filtro de consulta para recuperar itens específicos nos resultados do recurso participants.

    É possível usar os campos startTime ou endTime para filtrar usuários que se inscreveram antes ou saíram após um determinado período. Ambos os campos usam o formato Carimbo de data/hora no formato UTC "Zulu" RFC 3339, com resolução de nanossegundos e até nove dígitos fracionários: {year}-{month}-{day}T{hour}:{min}:{sec}[.{frac_sec}]Z. Exemplo:

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

    Para listar todas as sessões de participantes ativas no registro de conferência, use endTime IS NULL.