0
votes

Trying to use the Google Calendar API to get a list of events, getting returned with a 400 Error: Missing end time. Details below. Any suggestions?

Body

{"calendarId":"[email protected]","timeMin":"2018-03-04T19:00:00+00:00","timeMax":"2018-03-07T19:00:00+00:00","timeZone":"America/New_York","showDeleted":true}

Headers

'Content-Type', 'application/json' 'Authorization', 'Bearer '+access_token

Endpoint & Method

Endpoint=https://www.googleapis.com/calendar/v3/calendars/george.albrecht%40xxx.com/events, Method=GET

1

1 Answers

0
votes

startTime and endTime in body looks like these:

var event = {
  'summary': 'This is a test Calendar invite using NodeJS',
  'location': 'Under the Bridge',
  'description': 'I dont ever wanna feel Like I did that day But take me to the place I love Take me all the way',
  'start': {
    'dateTime': '2018-02-25T12:58:05-07:00',
    'timeZone': 'America/Los_Angeles',
  },
  'end': {
    'dateTime': '2018-02-26T06:00:00-07:00',
    'timeZone': 'America/Los_Angeles',
  },
  'recurrence': [
    'RRULE:FREQ=DAILY;COUNT=2'
  ],
  'attendees': [
    {'email': '[email protected]'}

  ],
  'reminders': {
    'useDefault': true
  }
};

If that solution still doesn't work, try downgrading the package:

[email protected] works --> with @25.0.0 i got the error ... and [email protected] as mentioned in this SO post.