When creating Calendar Events with Google Meet using Events.insert method, you need to do the following:
- Set
conferenceDataVersion
parameter to 1
Version 1 enables support for copying of ConferenceData
as well as for creating new conferences using the createRequest
field of conferenceData
.
- To create new conference details, use
createRequest
field of conferenceData
. Set conferenceSolutionKey type
to "hangoutsMeet" and set a random string for requestId
in the request body.
Sample conferenceData:
"conferenceData": {
"createRequest": {
"conferenceSolutionKey": {
"type": "hangoutsMeet"
},
"requestId": "7qxalsvy0exxaje"
}
}
If you want to send meeting invite to different people using Events.insert method, you need to do the following:
Set sendUpdates
parameter to "all" to send notifications to all the guests invited.
Add event guests' using attendees
properties in the request body.
Sample:
"attendees": [
{
"email": "[email protected]"
},
{
"email": "[email protected]"
}
],
Sample Events.insert parameters and request body:
{
"end": {
"dateTime": "2021-01-01T04:00:00+08:00"
},
"start": {
"dateTime": "2021-01-01T03:00:00+08:00"
},
"attendees": [
{
"email": "[email protected]"
},
{
"email": "[email protected]"
}
],
"conferenceData": {
"createRequest": {
"conferenceSolutionKey": {
"type": "hangoutsMeet"
},
"requestId": "7qxalsvy0exxaje"
}
},
"summary": "Sample Meeting"
}
Output:
References:
Create Events using Calendar API
Add video and phone conferences to events
Calendar API Reference
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…