title: Clarification on putting a google calender entry from java
body: <p>I am trying to put an entry in google calendar from my application. Just a simple text title, content and date entries. Please find below the code snippet which am trying to use;</p>
  
  <pre><code>    public void temp() {
          URL postURL = null;
          try {
              postURL = new URL("http://www.google.com/calendar/feeds/MAILID@gmail.com/PASSWORD/full");
              EventEntry eventEntry = new EventEntry();
              eventEntry.setTitle(new PlainTextConstruct("One"));
              eventEntry.setContent(new PlainTextConstruct("Two"));
  
              When eventTime = new When();
              eventTime.setStartTime(DateTime.parseDateTime("2016-03-09T15:00:00-08:00"));
              eventTime.setEndTime(DateTime.parseDateTime("2016-03-09T15:00:00-08:00"));
              eventEntry.addTime(eventTime);
  
              CalendarService calendarService = new CalendarService("Savor");
              EventEntry createdEvent = calendarService.insert(postURL, eventEntry);
          } catch (Exception e) {
              e.printStackTrace();
          }
      }
  </code></pre>
  
  <p>When executing this, am getting the service forbidden exception;
  [Ignore the line numbers though]</p>
  
  <pre><code>    com.google.gdata.util.ServiceForbiddenException: Forbidden
  &lt;HTML&gt;
  &lt;HEAD&gt;
  &lt;TITLE&gt;Forbidden&lt;/TITLE&gt;
  &lt;/HEAD&gt;
  &lt;BODY BGCOLOR="#FFFFFF" TEXT="#000000"&gt;
  &lt;H1&gt;Forbidden&lt;/H1&gt;
  &lt;H2&gt;Error 403&lt;/H2&gt;
  &lt;/BODY&gt;
  &lt;/HTML&gt;
  
      at com.google.gdata.client.http.HttpGDataRequest.handleErrorResponse(HttpGDataRequest.java:605)
      at com.google.gdata.client.http.GoogleGDataRequest.handleErrorResponse(GoogleGDataRequest.java:564)
      at com.google.gdata.client.http.HttpGDataRequest.checkResponse(HttpGDataRequest.java:560)
      at com.google.gdata.client.http.HttpGDataRequest.execute(HttpGDataRequest.java:538)
      at com.google.gdata.client.http.GoogleGDataRequest.execute(GoogleGDataRequest.java:536)
      at com.google.gdata.client.Service.insert(Service.java:1409)
      at com.google.gdata.client.GoogleService.insert(GoogleService.java:613)
      at GCalender.temp(GCalender.java:65)
      at GCalender.main(GCalender.java:88)
  
  
  The exception is being thrown at this line: EventEntry createdEvent = CalendarService.insert(postURL, eventEntry);
  </code></pre>
  
  <p>Any one faced the same issue already? Kindly provide your inputs, Thanks.</p>