How to disable Google’s “Video Call” default in Calendar Api?

戏子无情 提交于 2019-12-03 16:43:23

Edited 2018-09-19

You can remove the Hangout from a Google Calendar event by making an Events.patch request, ensuring you set the query parameter conferenceDataVersion to 1 and with a body that sets conferenceData to null. For example:

POST https://www.googleapis.com/calendar/v3/calendars/primary/events/{EVENT_ID}
     ?conferenceDataVersion=1
Authorization: Bearer {ACCESS_TOKEN}

{
 "conferenceData": null
} 

If anyone is still looking for the solution. Here is an example of how we have done it using npm module googleapis.

This is done during 'insert' and not during 'patch'. Please note that 'conferenceData' is null and conferenceDataVersion is set to 1.

var event = {
    'summary': 'some summary data here',
    'location': 'some location',
    'description': 'add your description',
    'start': {
        'dateTime': 'add your start time here',
    },
    'end': {
        'dateTime': 'add your end time here',
    },
    'attendees': [{
            'email': 'attendee1@email.com'
        }
    ],
    'reminders': {
        'useDefault': true
    },
    'conferenceData' : null
};

calendar.events.insert({
    auth: oauth2Client,
    calendarId: 'primary',
    conferenceDataVersion: 1,
    resource: event,
    sendNotifications: false,
    email: 'youremail@emailprovider.com'

}, function (err, event) {
    if (err) {
        console.log(err)
    }
    console.log(event)
});
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!