Hello Gwen,

What do you mean by "not being the owner of any of the calendars on my WORK
domain"? If you are authorizing the requests with your work account, there
should be no problem for you app to access this account's calendar
information.

When granting authorization, can you make sure that the account used in the
grant page is actually the work account? You can check the account used on
the upper-right corner of the page.

Best,
Alain

On Sat, Jul 23, 2011 at 5:37 AM, Gwen <[email protected]> wrote:

> I revoked access to my app on localhost from my HOME @ gmail account
> and now when I check the token it is blank every time call
> getEventsFeed on a different calendar other than the one I selected
> the previous time I authenticated.  Has is got something to do with me
> not being the owner of any of the calendars on my WORK domain?
>
> Can someone please tell me how to troubleshoot this please?
>
> Thank you.  Gwen
>
> On Jul 23, 9:01 pm, Gwen <[email protected]> wrote:
> > Hi Everyone,
> >
> > I'm going a bit loopy with this problem (first day with the API) -
> > pseudo code is:
> >
> > Login/Authenticate as [email protected] google account.
> >
> > Load list of calendars for [email protected] google account.
> >
> > Select calendar to getEventsFeed (not default user). Check token,
> > token still active.
> >
> > Error message saying "[email protected] does not have access to view this
> > calendar."
> >
> > I'm definitely not logged in as [email protected] and if I turn on
> > Private Browsing I get an authentication error or bad URI on the
> > getEventsFeed call.  Can someone please tell me what I'm missing
> > here?  (I've also had visibility errors previously, but not getting
> > them now)
> >
> > var EVENT_FEED_URL =
> >                                 "
> https://www.google.com/calendar/feeds/default/allcalendars/full";;
> >
> >                         function init() {
> >
> >                                 var token =
> google.accounts.user.checkLogin(EVENT_FEED_URL);
> >                                 calendarService = new
> > google.gdata.calendar.CalendarService('WORK_App');
> >                                 var authButton =
> document.getElementById('auth_button');
> >                                 if
> (google.accounts.user.checkLogin(EVENT_FEED_URL)) {
> >                                         authButton.value = 'Logout';
> >                                         // get a list of calendars
> >
> calendarService.getAllCalendarsFeed(EVENT_FEED_URL,
> > callbackGetCalendars, handleError);
> >                                 } else {
> >                                         authButton.value = 'Login';
> >                                 }
> >                         };
> >
> >                         // Tells the google JS lib to call the init
> function once loaded
> >                         google.setOnLoadCallback(init)
> >
> >                         /* LOADING CALENDARS */
> >                                 var callbackGetCalendars =
> function(result) {
> >                                         // Obtain the array of Calendars
> >                                         var entries = result.feed.entry;
> >                                         console.log(result.feed.entry);
> >                                         for (var i = 0; i <
> entries.length; i++) {
> >                                                 var calendarList =
> document.getElementById(CALENDAR_LIST);
> >                                                 var calendarEntry =
> entries[i];
> >                                                 var calendarTitle =
> calendarEntry.getTitle().getText();
> >                                                 var calendarId =
> calendarEntry.getId().getValue();
> >                                                 var option =
> document.createElement("option");
> >                                                 option.value =
> calendarId;
> >
> option.appendChild(document.createTextNode(calendarTitle));
> >
> calendarList.appendChild(option);
> >                                         }
> >                                 }
> >                         /* END OF LOADING CALENDARS */
> >
> >                         // Error handler to be invoked when anything
> produces an error
> >                         var handleError = function(error) {
> >                           alert(error);
> >                         }
> >
> >                         function loadEvents(URI) {
> > //                              loginOrLogout();
> >
> >                                 if
> (google.accounts.user.checkLogin(EVENT_FEED_URL)) {
> >
> >                                         var cleanURI =
> URI.replace('default/calendars/', '');
> >                                         cleanURI += '/private/full';
> >                                         //alert(cleanURI)
> >
> >                                         // above not working, try hard
> coded..
> >                                         cleanURI = "
> https://www.google.com/calendar/feeds/
> > WORK.com_cpt5np6dspoug87rc08m9uaje4%40group.calendar.google.com/
> > private/full";
> >
> calendarService.getEventsFeed(cleanURI, handleEventsFeed,
> > handleError);
> >                                 }
> >                         }
> >
> > Thanks for any help or suggestions; I'm totally stumped here.
>
> --
> You received this message because you are subscribed to the Google
> Groups "Google Calendar Data API" group.
> To post to this group, send email to
> [email protected]
> To unsubscribe from this group, send email to
> [email protected]
> For more options, visit this group at
> http://code.google.com/apis/calendar/community/forum.html
>



-- 
Alain Vongsouvanh

-- 
You received this message because you are subscribed to the Google
Groups "Google Calendar Data API" group.
To post to this group, send email to
[email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://code.google.com/apis/calendar/community/forum.html

Reply via email to