java - Google Calendar API server side access -


i implemented utility perform background operation using google calendar api , server side authentication flow without user interface. read events private calendar without using authorization flow offline access or put calendar public.

i'm using code authentication:

googlecredential credential = new googlecredential.builder()             .settransport(schedulercalendar.http_transport)             .setjsonfactory(schedulercalendar.json_factory)             .setserviceaccountid(schedulercalendar.service_account_email)             .setserviceaccountscopes(schedulercalendar.scopes)             .setserviceaccountprivatekeyfromp12file(new file("key.p12")).build(); 

and following read calendar events:

list eventslist = calendar.events().list(calendarid); 

the response 404 calendar not found.

any suggestion?

i solved problem sharing calendar *@developer.gserviceaccount.com, , added http://www.google.com/calendar/feeds/ scope of request.

the calendar i'm using google apps user add account *.apps.googleusercontent.com -> http://www.google.com/calendar/feeds/ manage api client access google apps control panel.


Comments

Popular posts from this blog

blackberry 10 - how to add multiple markers on the google map just by url? -

php - guestbook returning database data to flash -

delphi - Dynamic file type icon -