.net C# Getting The remote server returned an error: (403) Forbidden when trying to get Google Calendar Resource

532 views
Skip to first unread message

Jon Emmett

unread,
Sep 27, 2012, 10:05:58 AM9/27/12
to google-ca...@googlegroups.com
Good Morning,

This is my first post here, so please forgive me if my formatting is incorrect. 

I have an issue with the Google Apps Calendar API, the tutorial seems easy enough, but it keeps throwing a (403) Forbidden error when I try to use it. I mean I'm using it literally right from the tutorial. I know it has to be something simple I'm missing, but your constructive thoughts would be appreciated.

CalendarResourceService customerVisit = new CalendarResourceService("Domain name", "Apps");
customerVisit.setUserCredentials("DomainAdmin", "AdminPassword");

 AppsExtendedEntry entry = customerVisit.RetrieveCalendarResource("Large Conference Room");

James Dunne

unread,
Oct 3, 2012, 12:34:14 PM10/3/12
to google-ca...@googlegroups.com
Hi, I'm not from Google, but I think I might be of assistance here.

I'm not familiar with the API calls you mention there; that might be targeting version 2 of the API? You'll want to stick with version 3 since that's the latest. What language is that? It looks like Java or C# to me; there's not enough context to differentiate. I'd guess Java because of the "setUserCredentials" convention.

Based on some details from your question, can I assume you're a Google Apps Domain admin and want to write a back-end service that needs to use domain admin access to create/update events with?

If that's the case, perhaps my blog post would help. I wrote this detailed blog post on how to get 2-legged OAuth 1.0 working against Google Calendar v3 API, with some specifics for C#.
Reply all
Reply to author
Forward
0 new messages