I am using google APIs to create an event and add a google meet link to that event.
Calendar event creation is working fine but I am not able to add a google meet link
const response = await calendar.events.patch({
auth: auth,
calendarId: calendarId,
eventId: "6df3sea0jhl6tueoos4qjr41a0",
requestBody: {
conferenceData: {
createRequest: {
requestId: "asdafas14",
},
conferenceSolution: {
key: {
type: "hangoutsMeet",
},
},
},
},
sendNotifications: true,
conferenceDataVersion: 1,
});
With the above payload, the response is 200 but no meeting link was added
Also tried this by changing payload
await calendar.events.patch({
auth: auth,
calendarId: calendarId,
eventId: "6df3sea0jhl6tueoos4qjr41a0",
requestBody: {
conferenceData: {
createRequest: {
requestId: "asdafas14",
conferenceSolutionKey: {
type: "hangoutsMeet",
},
},
},
},
sendNotifications: true,
conferenceDataVersion: 1,
});
Response is 400 and gives the errors
{
domain: 'global',
reason: 'invalid',
message: 'Invalid conference type value.'
}
I am using a developer service account from https://console.cloud.google.com/apis/dashboard
Can anyone please help me with what is wrong here? Thanks in advance