[英]Get meeting link with Google calendar api
我希望將 Google 日歷 API 用於某個應用程序,但我想獲得 Google meet 鏈接(用於 G Suite 帳戶)。 據我所知,該選項是不可能的,還是我錯了?
提前致謝!
根據https://cloud.google.com/blog/products/application-development/hangouts-meet-now-available-in-google
您需要在 ConferenceData.entryPoints[] 中搜索entryPointType = "video"
元素,然后您可以使用 matchingObject.uri 來獲取 Google meet 鏈接。
在 Javascript / nodejs 中,解決方案類似於:
var {google} = require('googleapis');
const eventId = "<yourEventId>";
const calendarId = "<yourCalendarId>";
const calendar = google.calendar({
version : "v3",
auth : auth
});
calendar.events.get({
calendarId,
eventId
}, ( err, res ) => {
if( err ) {
console.log( err );
} else {
const conferenceData = res.conferenceData;
if( conferenceData ) {
const entryPoints = conferenceData.entryPoints;
if( entryPoints ) {
const videoDetails = entryPoints.find( entryPoint => entryPoint.entryPointType == "video" );
if( videoDetails ) {
console.log( "Google Meet link", videoDetails.uri );
} else {
console.log( "No video details available" );
}
} else {
console.log( "No entry points available" );
}
} else {
console.log( "No conference data available" );
}
}
});
截至目前,日歷 API 中只有HangoutLink 。 如果您想知道如何在 Javascript 中使用它,請查看本指南。
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.