Closed GoogleCodeExporter closed 9 years ago
Also from the API console:
Requests % Requests Methods Error codes
416 63.32% calendar.calendars.get 400
241 36.68% calendar.events.insert 400
Original comment by stephan....@gmail.com
on 17 Dec 2012 at 1:23
More information:
<dependencies>
<dependency>
<groupId>com.google.apis</groupId>
<artifactId>google-api-services-calendar</artifactId>
<version>v3-rev19-1.12.0-beta</version>
</dependency>
<dependency>
<groupId>com.google.http-client</groupId>
<artifactId>google-http-client-jackson2</artifactId>
<version>${project.http.version}</version>
</dependency>
<dependency>
<groupId>com.google.oauth-client</groupId>
<artifactId>google-oauth-client-jetty</artifactId>
<version>${project.oauth.version}</version>
</dependency>
</dependencies>
___
I use JDK 1.7
___
Situation
Trying to connect to the calendars of a Google Domain using a Service Account:
GoogleCredential credential = new GoogleCredential.Builder()
.setTransport(HTTP_TRANSPORT)
.setJsonFactory(JSON_FACTORY)
.setServiceAccountId(<...@developer.gserviceaccount.com>)
.setServiceAccountScopes(CalendarScopes.CALENDAR, CalendarScopes.CALENDAR_READONLY)
.setServiceAccountPrivateKeyFromP12File(<my key.p12 file>)
.build();
client = new com.google.api.services.calendar.Calendar.Builder(
HTTP_TRANSPORT, JSON_FACTORY, credential)
.setApplicationName("HolidaySyncs").build();
Event result = client.events().insert(holiday.getCalendarId(), event).execute();
Original comment by stephan....@gmail.com
on 17 Dec 2012 at 1:48
please higher the priority. My application get's these error 95% of the times
and it is really annoying because my project is close to release to our client.
Original comment by stephan....@gmail.com
on 17 Dec 2012 at 2:39
Sorry to hear about this problem you are encountering.
I recommend that you ask this question on either StackOverflow:
http://code.google.com/p/google-api-java-client/wiki/Support#Ask_Questions
Or on the Calendar API forum:
https://groups.google.com/forum/?fromgroups#!forum/google-calendar-api
Original comment by yan...@google.com
on 17 Dec 2012 at 3:05
This often happens when the user is a google user but he isn't connecte to
google plus.
It should also explode in this call: service.people().get("me").execute();
Original comment by mufumb...@gmail.com
on 22 Aug 2013 at 10:03
Original issue reported on code.google.com by
stephan....@gmail.com
on 17 Dec 2012 at 1:23