I am trying to insert an event in a Google Calendar using the Google Calendar API.
The event resource I am inserting:
{
"summary": "test",
"location": "test",
"description": "test",
"start": {
"dateTime": "2015-11-02T10:00:00-05:00",
"timeZone": "America/Toronto"
},
"end": {
"dateTime": "2015-11-02T11:00:00-05:00",
"timeZone": "America/Toronto"
},
"attachments": [
{
"fileUrl": ""
}
],
"attendees": [
{
"email": "[email protected]"
},
{
"email": "[email protected]"
}
],
"reminders": {
"useDefault": false,
"overrides": [
{
"method": "email",
"minutes": 1440
},
{
"method": "popup",
"minutes": 10
}
]
}
}
This event is sent as the body of a POST request to https://www.googleapis.com/calendar/v3/calendars/calendarId/events. I am not using any library.
I consistently get a "missing end time" error. I found a few similar issues such as this one, (s)he is using the Javascript library and suggests to send the following as a body:
{
resource:<event above>,
calendarId:<calendarId>
}
But this did not work in my case, perhaps because I don't use a library. I dont't think it matters, but I am doing this inside a Meteor app. Any idea?
EDIT Turns out it was a meteor related issue after all. I was making a mistake using their HTTP lib.