Hi, Unfortunately I'm reading this message thread only now. I think that the (otherwise pretty good!) GAE documentation on the use of the Data APIs could/should better explain that
gdata.alt.appengine.run_on_appengine(gdataService) also changes the token store of the gdataService. As an exercise I made a little Facebook App (that runs on GAE and uses the Google Calendar API). Hence this app has no need to authenticate the user as a Google user. I'd figured out the token store "issue" by myself and fixed it by changing the GData module, like this: def run_on_appengine(gdata_service, use_engine_token_store=True): gdata_service.http_client = AppEngineHttpClient() if use_engine_token_store: gdata_service.token_store = AppEngineTokenStore() return gdata_service So that I could pass "use_engine_token_store=False". This patch is fine but needs to be applied whenever the library changes. Likewise the suggestion by Jeff S may need to be slightly changed whenever the gdataService "normal" token store is replaced/renamed. Anyway in my opinion the most important thing is to document this change in token store in the Note mentioned in step 2 of http://code.google.com/appengine/articles/gdata.html. Thanks! Robert P.S. I blogged on my experiences on GAE so far at: http://betweenthekeys.blogspot.com/2008/10/battling-platforms.html On Sep 24, 1:42 am, Jeff S <[EMAIL PROTECTED]> wrote: > Hi Murali, > > Your code should work if you are signed in to your app. Beginning in > 1.2.1, the gdata-python-client library stores auth tokens in the > datastore, but only does so if they can be associated with the current > user. In most cases, you wouldn't want every user to be using the same > authtoken, so the library will notstoreatokenif it doesn't know > who it belongs to. It looks like you want every user to use the > sametokenhere, so you can either sign in to your app, or use an in memory > token_store by adding: > > gdataService = gdata.blogger.service.BloggerService() > gdata.alt.appengine.run_on_appengine(gdataService) > gdataService.token_store = atom.token_store.TokenStore() > > Happy coding, > > Jeff > > On Sep 21, 7:24 pm, Murali <[EMAIL PROTECTED]> wrote: > > > Hi All, > > > I am trying to access GData Blogger API on App Engine. > > Though ProgrammaticLogin() was successful, subsequent GetBlogFeed() > > fails throwing the following error: > > > File "C:\xxx\src\gdata\blogger\service.py", line 40, in GetBlogFeed > > return self.Get(uri, converter=gdata.blogger.BlogFeedFromString) > > File "C:\xxx\src\gdata\service.py", line 703, in Get > > 'reason': server_response.reason, 'body': result_body} > > RequestError: {'status': 401, 'body': 'Must authenticate to use > > 'default' user', 'reason': ''} > > > I am using gdata-py 1.2.1 and latest version of app engine sdk on > > Windows Vista. > > I have verified the email/password on blogger and everything works > > fine. Even the ProgrammaticLogin() call was successful. > > > Here is the source code snippet: > > --- > > gdataService = gdata.blogger.service.BloggerService() > > gdata.alt.appengine.run_on_appengine(gdataService) > > > gdataService.email = 'email' > > gdataService.password = 'password' > > gdataService.source = 'SA01-PApp-1.0' > > gdataService.service = 'blogger' > > gdataService.account_type = 'GOOGLE' > > gdataService.server = 'www.blogger.com' > > gdataService.ProgrammaticLogin() > > > feed = gdataService.GetBlogFeed() > > -- > > Has anybody tried to use blogger API on App engine and experience > > similar problems? > > Any help or pointers would be greatly appreciated. > > > Thank you so much, > > Murali --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Google App Engine" group. To post to this group, send email to google-appengine@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/google-appengine?hl=en -~----------~----~----~----~------~----~------~--~---