Google Calendar API - how to add a calendar gadget along with event?

Go To


I'm trying to add a google calendar gadget along with an event. However, whenever I try and add a gadget along with an event, the google calendar API gives me an 'invalid value' error.

I'm using the event.insert protocol. If I send the request in without the gadget block, it works fine and adds an event. However, adding the gadget block throws an error.

 "location": "San Jose, CA",
 "description": "blah blah blah blah",
 "kind": "calendar#event",
 "start": {
  "dateTime": "2012-04-04T10:00:00.000-07:00"
 "end": {
  "dateTime": "2012-04-04T10:00:00.000-07:00"
 "gadget": {
  "iconLink": "",
  "link": "",
  "title": "Word of the Day",
  "type": "application/x-google-gadgets+xml",
  "height": 136,
  "width": 300,
  "display": "icon"

Does anyone know why this is occurring? I really need to find a way to insert images into the events I add to a google calendar. Thanks!

2012-04-04 06:22
by skarim
can you please explain how the gadget will be displayed while creating any event in google calendar - Pitchiah Natarajan 2018-02-13 05:42


I too was faced with this problem. It seems to me that the the iconLink and link must be https for this to work.

2012-04-04 22:16
by khester