title: Google Calendar error 400
body: <p>I am trying to add/insert a google calendar event using PHP, i am using the google API libraries via a <a href="https://packagist.org/packages/google/apiclient" rel="nofollow">composer install</a>.</p>
  
  <p>I have traced the error to the object being inserted (i have the token).  I did a json_encode of the event to be inserted to test with <a href="https://developers.google.com/google-apps/calendar/v3/reference/events/insert" rel="nofollow">google's online checker</a>  (for which i use the 'primary' calendarId)</p>
  
  <pre><code>   {
      "creator": null,
      "organizer": null,
      "summary": "Meeting with Bart Simpson",
      "id": null,
      "attendees": null,
      "htmlLink": null,
      "recurrence": null,
      "start": {
          "date": null,
          "timeZone":"Australia/Hobart",
          "dateTime": "2014-02-03T15:00:00+11:00"
      },
      "etag": null,
      "location": "-42.859634, 147.30928399999993",
      "recurringEventId": null,
      "gadget": null,
      "status": null,
      "updated": null,
      "description": "Visit",
      "iCalUID": null,
      "extendedProperties": null,
      "endTimeUnspecified": null,
      "sequence": null,
      "visibility": null,
      "guestsCanModify": null,
      "end": {
          "date": null,
          "timeZone":"Australia/Hobart",
          "dateTime": "2014-02-03T16:00:00+11:00"
      },
      "attendeesOmitted": null,
      "kind": null,
      "locked": null,
      "created": null,
      "colorId": "0",
      "anyoneCanAddSelf": null,
      "reminders": null,
      "guestsCanSeeOtherGuests": null,
      "originalStartTime": null,
      "guestsCanInviteOthers": null,
      "transparency": null,
      "privateCopy": null
  }
  </code></pre>
  
  <p>from which i get the response:</p>
  
  <pre><code>    400 Bad Request
  
  - Show headers -
  
  {
   "error": {
    "errors": [
     {
      "domain": "global",
      "reason": "invalid",
      "message": "Invalid value for: null is not a valid value"
     }
    ],
    "code": 400,
    "message": "Invalid value for: null is not a valid value"
   }
  }
  </code></pre>
  
  <p>It seems the property name is missing from the  message.  "invalid value for <strong>???</strong>:"</p>
  
  <p>I have tried removing items in a stepwise manner but it does not appear to work until only the start and end are left.  As all of the null entries are created by the API, I would have thought they were correct.</p>
  
  <p>It was working before, and I changed something, but i am not sure what.  Am I missing something in my sleep deprived state?</p>