0

I'm accessing the Google Calendar API and authenticating with a service token to a calendar owned by an apps-for-domains account. When I call calendar.events.list, I get the response:

{ kind: 'calendar#events',
  etag: [snip],
  summary: [snip],
  description: [snip],
  updated: '2014-11-16T12:33:06.434Z',
  timeZone: 'Europe/London',
  accessRole: 'reader',                <------ this is the problem
  defaultReminders: [],
  nextSyncToken: [snip],
  items: [] }

I would like to be able to write to the calendar. The token's accessRole is reader. How do I grant the service token writer access to the calendar? I have tried using the Google Calendar web UI to give "Make changes AND manage sharing" access to the service-token's email address, but it automatically changes to "See all event details" when I save.

sil
  • 1,769
  • 1
  • 18
  • 34

1 Answers1

1

The web UI will only allow you to share the calendar with users from the same domain as your Google Apps account. In order to use the service account, you have to give it permission in the Apps Admin, as described here (in the step 4 the name of the option is wrong, I can't remember it exactly, but it's the 3rd link in the page).

Vinicius Braz Pinto
  • 8,209
  • 3
  • 42
  • 60
  • 1
    Note that this requires an admin of the google apps domain, which I am not. I avoided this problem by having the service account itself create a calendar (through the API) and then adding my personal address as a second owner. – sil Nov 17 '14 at 17:43