Hello Gwen,

You can use an OAuth token retrieved from OAuth Playground as long as you
set the signature method to "HMAC-SHA1" and put "anonymous" for the consumer
key and secret. In your first post, you were using Javascript to consume the
Google Calendar API; but if you code is intended to run on an iPad, you
might consider the Objective-C client library:
  http://code.google.com/p/gdata-objectivec-client/

Best,
Alain

On Tue, Jul 26, 2011 at 11:26 PM, Gwen <[email protected]> wrote:

> Hi Alain,
>
> Definitely only logged in as the work address and I can get the
> calendar events at a 50% success rate so I have the correct
> permissions (I am the admin so I've checked).  No error messages other
> than the wrong permissions / time one however if I refresh again it'll
> sometimes work.
>
> When I go to get an OAuth token from
> https://www.google.com/accounts/OAuthGetRequestToken
> on the link you sent I get
> "parameter_absent
>
> oauth_parameters_absent:oauth_consumer_key&oauth_signature_method&oauth_signature&oauth_timestamp&oauth_nonce&scope"
>
> I suspect that OAuth tokens will only work if I'm calling the code
> from the associated domain?  The app will be running from an iPad with
> files hosted on it locally; is this ok?
>
> Thanks again for your help on this; I think I'm pushing an elephant up
> the stairs and am actually getting a timeout - given it was originally
> the google code sample that was erroring and sometimes then working
> there may be nothing to troubleshoot.
>
> Cheers,
> Gwen
>
> On Jul 27, 1:05 am, Alain Vongsouvanh <[email protected]> wrote:
> > Hello Gwen,
> >
> > I don't think this is due to the API timing out. You can try to consume
> the
> > API using raw XML by using OAuth Playground:
> >  http://code.google.com/apis/gdata/articles/oauth.html
> >
> > Are you using multi-login? Can you make sure that you are only logged-in
> > using your work account?
> >
> > Also, the issue might be due to the fact that the admin of your work
> domain
> > has disabled API access to your calendar; can you check that API access
> is
> > allowed?
> >
> > Thanks!
> > Alain
> >
> >
> >
> > On Mon, Jul 25, 2011 at 8:51 PM, Gwen <[email protected]> wrote:
> > > Hi Alain,
> >
> > > Thank you for the reply.
> >
> > > Yup, I have access and authorization using the work (google hosted)
> > > domain.  I've cleared my cache, tried Safari and IE and revoked access
> > > under My Accounts to the localhost web application for my home gmail
> > > address.  Still if If I confirm I'm logged in against it with
> > > checkLogin() and then request the events from the calendar I
> > > definitely will get the timed out message / not authorized if it's the
> > > second lot of calls to the API.  Token is still valid too.
> >
> > > Could it actually be timing out?  Is the API that slow?  I am in
> > > Australia but have no problems with the map API.
> >
> > > Cheers,
> > > Gwen
> >
> > > On Jul 26, 1:49 am, Alain Vongsouvanh <[email protected]> wrote:
> > > > 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
> >
> > --
> > 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
>



-- 
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