title: Google Calendar API - 404 on calendar (service account)
body: <p>I have a problem with my simple calendar API wrapper.</p>
  
  <p>My code:</p>
  
  <pre><code>key_file = open('api_key.p12', 'rb')
  key = key_file.read()
  key_file.close()
  
  credentials = SignedJwtAssertionCredentials(
   config.SERVICE_ACCOUNT_EMAIL,
   key,
   scope='https://www.googleapis.com/auth/calendar'
  )
  http = httplib2.Http()
  http = credentials.authorize(http)
  
  service = build("calendar", "v3", http=http)
  </code></pre>
  
  <p>And I'm calling it with: </p>
  
  <pre><code>service.events().insert(calendarId=calendar_id,
                                 body=event_body).execute()
  </code></pre>
  
  <p>And always I have </p>
  
  <pre><code>HttpError: &lt;HttpError 404 when requesting   https://www.googleapis.com/calendar/v3/calendars/my_company_resource_id@resource.calendar.google.com?alt=json returned "Not Found"&gt;
  </code></pre>
  
  <p>When I use 'normal' OAuth2 scope (authorization in local web browser) it works, but I want to deploy my app on headless server, so I have to use Service Account. 
  I granted permissions for calendar api in my google apps admin panel, but it doesn't work.</p>
  
  <p>Any ideas?</p>