6 messages in com.googlegroups.google-calendar-help-dataapiRe: 404 Error Adding users to Access ...
FromSent OnAttachments
Fried IQ24 Jun 2008 13:45 
Austin (Google)25 Jun 2008 13:29 
Fried IQ26 Jun 2008 05:40 
Frank Mantek26 Jun 2008 05:51 
Fried IQ26 Jun 2008 08:21 
Frank Mantek26 Jun 2008 09:04 
Subject:Re: 404 Error Adding users to Access Control List
From:Fried IQ (frie@gmail.com)
Date:06/26/2008 05:40:00 AM
List:com.googlegroups.google-calendar-help-dataapi

Morning Austin,

Now I am simply confused.

The scenario is this. I am using the .NET API so it controls when I PUT and POST. The calendar that I am attempting to add a user to does not have an entry for that user already. It merely has an entry for the owner scoped as user and with the owner role (It is in fact a completely new sub calendar with no actions updates whatsoever made to it)

When I attempt to use the .NET sample code for adding a rule to the ACL list that is when I receive the (404) error. The exact format of the ACL link that I am posting to is;

http://www.google.com/calendar/feeds/community.nip@group.calendar.google.com/acl/full

The code is here:

AtomLink link = calendar.Links.FindService( AclNameTable.LINK_REL_ACCESS_CONTROL_LIST, null);

AclEntry entry = new AclEntry();

entry.Scope = new AclScope(); entry.Scope.Type = AclScope.SCOPE_USER; entry.Scope.Value = txtUsername.Text; entry.Role = AclRole.ACL_CALENDAR_READ;

// Uri aclUri = new Uri(string.Format("http:// www.google.com/calendar/feeds/{0}/acl/full", ParseCalendarIdFromUri(calendar.Id.Uri.Content)));

Uri aclUri = null; if (link != null) { aclUri = new Uri(link.HRef.ToString()); } else { throw new Exception("ACL link was null."); }

AclEntry insertedEntry = calService.Insert(aclUri, entry) as AclEntry;

According to the docs this is a correct link format for adding a new rule is it not? Also all accounts that I am adding exist in the same domain as the calendar itself. What confuses me is that everything else that I attempt with these calendars is working as expected, it's fantastic. But this one feature is key to my project and so I am at an impasse.

Is there any other information I can provide you?

Regards,

Christian

On Jun 25, 4:30 pm, "Austin (Google)" <api.@google.com> wrote:

Hi,

One thing to check to see if there is already an ACL entry for that particular user (the one you are trying to add).  If that's the case then you needs to do a PUT instead of POST because what you are really is update instead of a new insertt.  You send PUT to this ACL URL with trailing part indicating the user ACL entry you are updating -

example PUT URL to update ACL:

http://www.google.com/calendar/feeds/community.nipi@group.calendar.google.com/acl/full/user%3A

Hope it helps, Austin

On Tue, Jun 24, 2008 at 1:46 PM, Fried IQ <frie@gmail.com> wrote:

Good afternoon,

I am working with the C# .NET API for the Google Calender and so far have managed the accomplish everything that I've asked of the API.

However, one task has vexed me for the afternoon and so I am here looking for some insight. I've followed the the example code to the letter and each time that I attempt to Insert the AclEntry it returns me a "(404) Not Found" error.

The user that calendar service is authenticated as is the "owner" of the calendar according to the ACL for that calendar and I am posting the the proper Uri as far as I can tell, the Uri is below.

http://www.google.com/calendar/feeds/community.nip@group.calendar.google.com/acl/full

This is a sub calendar of course, but I receive the same error then Inserting in the primary calendar as well. I've tried assembling the Uri by hand and also pulling the ACL Uri from the calendar entry itself using the below code;

AtomLink link = calendar.Links.FindService(                        AclNameTable.LINK_REL_ACCESS_CONTROL_LIST, null);

Either way the Uri that I use is consistent with the Uri shown in all of the examples I've seen in the Google docs and from other sources. I have also tried this with multiple calendars always with the same result.

What am I missing? This is the last piece of a puzzle (at least until I tackle batch updates) and it is fustrating to hit this wall after a great deal of success.

Any information is greatly appreciated.

Fried IQ