Getting active conference Google Meet API

I am using @google-apps/meet in my node.js app in order to get real ending time of a meeting.
I tried different methods from Meet API and always get same behaviour.

Maybe I should use Reports API to get real ending time of google meeting? If so, please help me to use this api with Admin SDK, because I don’t have Google Admin Console

Here is my code. In response I’m getting this (sencetive data changed) if I am a creator of meeting (I see my user and other active attendees):

Plain text
Copy to clipboard
Open code in new window
EnlighterJS 3 Syntax Highlighter
<code>{ name: 'conferenceRecords/c00fb000-0000-40c9-9b0b-4b1bf1cd5c00/participants/000000000000000000000', earliestStartTime: { seconds: '1722932647', nanos: 766303000 }, latestEndTime: { seconds: '1722932745', nanos: 88111000 }, signedinUser: { user: 'users/000000000000000000000', displayName: 'User Name' }, user: 'signedinUser' }
</code>
<code>{ name: 'conferenceRecords/c00fb000-0000-40c9-9b0b-4b1bf1cd5c00/participants/000000000000000000000', earliestStartTime: { seconds: '1722932647', nanos: 766303000 }, latestEndTime: { seconds: '1722932745', nanos: 88111000 }, signedinUser: { user: 'users/000000000000000000000', displayName: 'User Name' }, user: 'signedinUser' } </code>
{ name: 'conferenceRecords/c00fb000-0000-40c9-9b0b-4b1bf1cd5c00/participants/000000000000000000000', earliestStartTime: { seconds: '1722932647', nanos: 766303000 }, latestEndTime: { seconds: '1722932745', nanos: 88111000 }, signedinUser: { user: 'users/000000000000000000000', displayName: 'User Name' }, user: 'signedinUser' } 

If I am not a creator, just a participant I don’t get any data about this meeting. How can I get similar response for those meetings, where I am just a participant?

Here is my code

Plain text
Copy to clipboard
Open code in new window
EnlighterJS 3 Syntax Highlighter
<code>const { SpacesServiceClient, ConferenceRecordsServiceClient } = require("@google-apps/meet").v2; const { sendNotification } = require("../services/notification.service"); const db = require("../models"); const Meeting = db.meetings;
const processEvents = async (authClient) => { // GET Meet API space name by conferenceId from Calendar API const spacesClient = new SpacesServiceClient({ authClient }); const meetingClient = new ConferenceRecordsServiceClient({ authClient }); for (const event of events) { if (event.conferenceData?.conferenceId) { const conferenceId = event.conferenceData.conferenceId; // console.log(conferenceId); const spacesRequest = { name: spaces/${conferenceId} }; try { const sessions = meetingClient.listConferenceRecordsAsync({ parent: conferenceId, }); for await (let session of sessions) { // console.log("SESSIONS ==> ", session); //set plan end time for meeting in db //if session.endTime is null, set meetingEnded to false //if session.endTime is not null, set meetingEnded to true, send notification const partisipants = await meetingClient.listParticipants({ parent: session.name }); for await (let partisipant of partisipants) { console.log("PARTISIPANT ==> ", partisipant); } }; const spaces = await spacesClient.getSpace(spacesRequest); // console.log("SPACE ==> ", spaces); console.log( "spaces[0]?.activeConference =====", spaces[0]?.activeConference ); } } catch (error) { console.error( Error processing event for conferenceId ${conferenceId}:, error ); } } } };
module.exports = { processEvents, };
</code>
<code>const { SpacesServiceClient, ConferenceRecordsServiceClient } = require("@google-apps/meet").v2; const { sendNotification } = require("../services/notification.service"); const db = require("../models"); const Meeting = db.meetings; const processEvents = async (authClient) => { // GET Meet API space name by conferenceId from Calendar API const spacesClient = new SpacesServiceClient({ authClient }); const meetingClient = new ConferenceRecordsServiceClient({ authClient }); for (const event of events) { if (event.conferenceData?.conferenceId) { const conferenceId = event.conferenceData.conferenceId; // console.log(conferenceId); const spacesRequest = { name: spaces/${conferenceId} }; try { const sessions = meetingClient.listConferenceRecordsAsync({ parent: conferenceId, }); for await (let session of sessions) { // console.log("SESSIONS ==> ", session); //set plan end time for meeting in db //if session.endTime is null, set meetingEnded to false //if session.endTime is not null, set meetingEnded to true, send notification const partisipants = await meetingClient.listParticipants({ parent: session.name }); for await (let partisipant of partisipants) { console.log("PARTISIPANT ==> ", partisipant); } }; const spaces = await spacesClient.getSpace(spacesRequest); // console.log("SPACE ==> ", spaces); console.log( "spaces[0]?.activeConference =====", spaces[0]?.activeConference ); } } catch (error) { console.error( Error processing event for conferenceId ${conferenceId}:, error ); } } } }; module.exports = { processEvents, }; </code>
const { SpacesServiceClient, ConferenceRecordsServiceClient } = require("@google-apps/meet").v2; const { sendNotification } = require("../services/notification.service"); const db = require("../models"); const Meeting = db.meetings;

const processEvents = async (authClient) => { // GET Meet API space name by conferenceId from Calendar API const spacesClient = new SpacesServiceClient({ authClient }); const meetingClient = new ConferenceRecordsServiceClient({ authClient }); for (const event of events) { if (event.conferenceData?.conferenceId) { const conferenceId = event.conferenceData.conferenceId; // console.log(conferenceId); const spacesRequest = { name: spaces/${conferenceId} }; try { const sessions = meetingClient.listConferenceRecordsAsync({ parent: conferenceId, }); for await (let session of sessions) { // console.log("SESSIONS ==> ", session); //set plan end time for meeting in db //if session.endTime is null, set meetingEnded to false //if session.endTime is not null, set meetingEnded to true, send notification const partisipants = await meetingClient.listParticipants({ parent: session.name }); for await (let partisipant of partisipants) { console.log("PARTISIPANT ==> ", partisipant); } }; const spaces = await spacesClient.getSpace(spacesRequest); // console.log("SPACE ==> ", spaces); console.log( "spaces[0]?.activeConference =====", spaces[0]?.activeConference ); } } catch (error) { console.error( Error processing event for conferenceId ${conferenceId}:, error ); } } } };

module.exports = { processEvents, };

New contributor

user26677819 is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.

Trang chủ Giới thiệu Sinh nhật bé trai Sinh nhật bé gái Tổ chức sự kiện Biểu diễn giải trí Dịch vụ khác Trang trí tiệc cưới Tổ chức khai trương Tư vấn dịch vụ Thư viện ảnh Tin tức - sự kiện Liên hệ Chú hề sinh nhật Trang trí YEAR END PARTY công ty Trang trí tất niên cuối năm Trang trí tất niên xu hướng mới nhất Trang trí sinh nhật bé trai Hải Đăng Trang trí sinh nhật bé Khánh Vân Trang trí sinh nhật Bích Ngân Trang trí sinh nhật bé Thanh Trang Thuê ông già Noel phát quà Biểu diễn xiếc khỉ Xiếc quay đĩa Dịch vụ tổ chức sự kiện 5 sao Thông tin về chúng tôi Dịch vụ sinh nhật bé trai Dịch vụ sinh nhật bé gái Sự kiện trọn gói Các tiết mục giải trí Dịch vụ bổ trợ Tiệc cưới sang trọng Dịch vụ khai trương Tư vấn tổ chức sự kiện Hình ảnh sự kiện Cập nhật tin tức Liên hệ ngay Thuê chú hề chuyên nghiệp Tiệc tất niên cho công ty Trang trí tiệc cuối năm Tiệc tất niên độc đáo Sinh nhật bé Hải Đăng Sinh nhật đáng yêu bé Khánh Vân Sinh nhật sang trọng Bích Ngân Tiệc sinh nhật bé Thanh Trang Dịch vụ ông già Noel Xiếc thú vui nhộn Biểu diễn xiếc quay đĩa Dịch vụ tổ chức tiệc uy tín Khám phá dịch vụ của chúng tôi Tiệc sinh nhật cho bé trai Trang trí tiệc cho bé gái Gói sự kiện chuyên nghiệp Chương trình giải trí hấp dẫn Dịch vụ hỗ trợ sự kiện Trang trí tiệc cưới đẹp Khởi đầu thành công với khai trương Chuyên gia tư vấn sự kiện Xem ảnh các sự kiện đẹp Tin mới về sự kiện Kết nối với đội ngũ chuyên gia Chú hề vui nhộn cho tiệc sinh nhật Ý tưởng tiệc cuối năm Tất niên độc đáo Trang trí tiệc hiện đại Tổ chức sinh nhật cho Hải Đăng Sinh nhật độc quyền Khánh Vân Phong cách tiệc Bích Ngân Trang trí tiệc bé Thanh Trang Thuê dịch vụ ông già Noel chuyên nghiệp Xem xiếc khỉ đặc sắc Xiếc quay đĩa thú vị
Trang chủ Giới thiệu Sinh nhật bé trai Sinh nhật bé gái Tổ chức sự kiện Biểu diễn giải trí Dịch vụ khác Trang trí tiệc cưới Tổ chức khai trương Tư vấn dịch vụ Thư viện ảnh Tin tức - sự kiện Liên hệ Chú hề sinh nhật Trang trí YEAR END PARTY công ty Trang trí tất niên cuối năm Trang trí tất niên xu hướng mới nhất Trang trí sinh nhật bé trai Hải Đăng Trang trí sinh nhật bé Khánh Vân Trang trí sinh nhật Bích Ngân Trang trí sinh nhật bé Thanh Trang Thuê ông già Noel phát quà Biểu diễn xiếc khỉ Xiếc quay đĩa
Thiết kế website Thiết kế website Thiết kế website Cách kháng tài khoản quảng cáo Mua bán Fanpage Facebook Dịch vụ SEO Tổ chức sinh nhật