0

I maintain an application that accesses calendar, tasks, etc. of Google Apps users. I have no trouble getting OAuth 2 working for that data. Now I'm trying to add access to calendar resources, but when I GET the appropriate URL, the result is http 403 forbidden. I have added this scope to the list of allowed scopes in my Google Apps account:

https://www.googleapis.com/auth/admin.directory.resource.calendar

And also added that to the scope that is used to generate the Claimset and JWT. I receive the authorization code as usual. My GET looks like this:

GET /admin/directory/v1/customer/my_customer/resources/calendars?access_token=ya29.GmyhBqkDSNQuaMKqoWeSo9-jBf1-lRLTMWx_4V8oTLR6yH8T09jqcMoOMVwUwZFEgt2E7vBhvcR8c2-_vV_i3Lh3eHYpE-Ks9HCXOWZvMylNNH7xEHMQ0jZb8o0z5cruHZkrytqawwBmOwKLHG4 HTTP/1.1
User-Agent: comaxis-agent/1.0
Host: www.googleapis.com
Accept: */*
GData-Version: 3.0

I can use that auth code to access my other data without problem, but the resource URL just doesn't work. It did work in the online API Explorer, but obviously I need my code to work. Any idea what I'm doing wrong?

Jeff McKay
  • 161
  • 2
  • 16
  • You can check the solution from this [SO post](https://stackoverflow.com/questions/42243221/403-error-from-google-admin-sdk-with-appassertioncredentials) and make sure your service account is set to Administrator. – Jessica Rodriguez Jan 30 '19 at 13:44
  • I figured it out - I needed to go to the developer console and enable the admin API. Duh. – Jeff McKay Jan 30 '19 at 18:51

0 Answers0