Google Calendar API .NET

I am starting at ground one with this.  I want to return a set of
calendar events for a range of dates.  I  found some sample c# code
and have a few questions.

1)  What is feedUri in the code below?  What should its value be?

static void Main(string[] args)
        userName = "";
        userPassword = "pass1234";
        feedUri = @"";

2)  What is the CalendarService parameter?  What value should I

CalendarService service = new CalendarService("exampleCo-
service.setUserCredentials(userName, userPassword);

3)  The code follows.  I am getting an Invalid Credentials error

static void PrintUserCalendars(CalendarService service)
            FeedQuery query = new FeedQuery();
            query.Uri = new Uri("
            AtomFeed calFeed = service.Query(query);  //Error here -
Invalid Credentials

-- Any help would be appreciated.


Who is Participating?
lenordisteConnect With a Mentor Commented:
these informations are actually provided in google's dev guide, you probably over looked them so here they are:
1) "The feedUri value is typically for working with your primary calendar"
2) "Create a new CalendarService instance, setting your application's name (in the form companyName-applicationName-versionID). "
3) you need to call "service.setUserCredentials()" with the right usernames and password before calling "Query". You probably need to double check your login info (remember to include the full user name including the domain name).

documenation reminder:

Good luck and let us know if it's not working for you !
try to use this line to authenticate the user to the service

service.setUserCredentials("username", "password");
this is the same what i said
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.