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?