Thanks for the awesome library, this helped me a lot! Here are some changes I made:
- No permission to push, or I would have created a PR:
CalendarAPI.js:29
scopes: ['https://www.googleapis.com/auth/calendar'],
// delegationEmail:
// https://github.com/extrabacon/google-oauth-jwt
// "if access is being granted on behalf of someone else, specifies who is impersonating the service account"
delegationEmail: config.delegationEmail
-
A little easier way to to configure:
this.config = {
keyFile: ./credentials/${process.env.GOOGLE_CALENDAR_KEY_FILE_PEM},
serviceAcctId: '[email protected]',
timezone: 'UTC+08:00',
delegationEmail: '[email protected]'
};
const cal = new CalendarAPI(this.config);
- To make sure attendees get email notifications:
cal.Events.insert(calendarId, event, {"sendUpdates": "all"})
Thanks for the awesome library, this helped me a lot! Here are some changes I made:
CalendarAPI.js:29
scopes: ['https://www.googleapis.com/auth/calendar'],
// delegationEmail:
// https://github.com/extrabacon/google-oauth-jwt
// "if access is being granted on behalf of someone else, specifies who is impersonating the service account"
delegationEmail: config.delegationEmail
A little easier way to to configure:
this.config = {
keyFile:
./credentials/${process.env.GOOGLE_CALENDAR_KEY_FILE_PEM},serviceAcctId: '[email protected]',
timezone: 'UTC+08:00',
delegationEmail: '[email protected]'
};
const cal = new CalendarAPI(this.config);
cal.Events.insert(calendarId, event, {"sendUpdates": "all"})