java - How to use Google Calendar API's Events.Insert command properly? -


so i've been using rest method of invoking google's api. need insert events particular calendar id have. post request i'm sending:

address: https://www.googleapis.com/calendar/v3/calendars/{calendarid}/events

body:

authorization:  bearer {access_token} {  "end": {   "datetime": "2012-08-30t12:30:00",   "timezone": "america/chicago"  },  "start": {   "datetime": "2012-08-30t14:00:00",   "timezone": "america/chicago"  },  "summary": "e e 306",  "colorid": "9"  "kind": "calendar#event" } 

and response keep getting:

{  "error":{   "errors":[    {     "domain":"calendar",     "reason":"timerangeempty",     "message":"the specified time range empty.",     "locationtype":"parameter",     "location":"timemax"    }   ],   "code":400,   "message":"the specified time range empty."  } } 

i don't understand possibly doing wrong. i've entered necessary data, , it's asking me parameter doesn't exist events. can't find documentation out there on particular problem. see i'm missing?

in midst of asking question, face palmed hard think i've done myself brain damage. turns out, reason couldn't find documentation on problem because of how spectacularly silly was.

the reason giving me such funny error because in copy-pasting doing test, flipped start , end times. so, telling google calendars enter event ended before started, doesn't end well.

long story short, if error referring "timemax" parameter while trying insert event, check start , end times.


Comments

Popular posts from this blog

java - Play! framework 2.0: How to display multiple image? -

gmail - Is there any documentation for read-only access to the Google Contacts API? -

php - Controller/JToolBar not working in Joomla 2.5 -