yashdosi
yashdosi

Reputation: 1256

Google Calendar API not working with curl client request

I am trying to create a google calendar event using curl this is my request but it is not working I have not idea what is the mistake that I am making :

curl "https://www.googleapis.com/calendar/v3/calendars/{CalID}/events?access_token={access_token}" -H "Content-Type: application/json" -X POST -d '{ "end": { "start": { "date": "2012-08-01", "dateTime": "2012-08-01 22:47:31.893205", "timeZone": "Asia/Calcutta" }, "end": { "date": "2012-08-08", "dateTime": "2012-08-08 22:47:31.893205", "timeZone": "Asia/Calcutta" }, "attendees": [ { "email": "[email protected]" }, { "email": "[email protected]" } ], "reminders": { "overrides": [ { "method": "email", "minutes": 10 } ] } }' -v

I keep getting Bad request Error. Can some tell me what is wrong with this request..??

Upvotes: 2

Views: 6264

Answers (1)

yashdosi
yashdosi

Reputation: 1256

Finally got the correct request :

curl "https://www.googleapis.com/calendar/v3/calendars/{CalendarID}/events?access_token={Access_token}" -H "Content-Type: application/json" -d ' { "start": { "dateTime": "2012-07-11T12:47:31+05:30" }, "end": { "dateTime": "2012-07-11T22:47:31+05:30" }, "attendees": [ { "email": "{Attendee_Email}" } ], "reminders": { "overrides":[ ] } }' -v

Upvotes: 5

Related Questions