Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7501209
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 29, 20262026-05-29T20:27:31+00:00 2026-05-29T20:27:31+00:00

I am currently trying to develop a GAE application. I followed this tutorial in

  • 0

I am currently trying to develop a GAE application.

I followed this tutorial in order to get access to gdocs using OAuth.
http://code.google.com/appengine/articles/python/retrieving_gdata_feeds.html

What I can’t understand is how to reuse this token afterwards.

If I directly try to access feeds on a second connection, I got bounced due to a lack of authorization (401).
I think I have to authenticate each time using the access_token in my Gdocs object, but can’t find the right way to do it.

Any ideas?

My code is the same as in the tutorial, plus:

# Create an instance of the DocsService to make API calls
gdocs = gdata.docs.client.DocsClient(source = SETTINGS['APP_NAME'])

class MainPage(webapp.RequestHandler):
@login_required
def get(self):
    my_user = users.get_current_user()

    # I think I have to authenticate, but don't know how here 
    token_key = 'access_token_%s' % my_user.user_id()
    access_token = gdata.gauth.ae_load(token_key)
    gdocs.auth_token = gdocs.get_access_token(access_token)

    feed = gdocs.GetResources()
    for entry in feed.entry:
        template = '<div>%s</div>'
        self.response.out.write(template % entry.title.text)

Which is launched by default.

I know I have access to the token key using ae_load(token_key), as I can print it.
Should I use gdocs to authenticate, or a more general client, as I is shown here :
http://ikaisays.com/2011/05/26/setting-up-an-oauth-provider-on-google-app-engine/

I checked and my token is listed in my private google account.

Thanks by advance !

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-29T20:27:32+00:00Added an answer on May 29, 2026 at 8:27 pm

    I finally answered my own question by searching in google apis.

    Here is how I use it :

        access_token_key = 'access_token_%s' % user.user_id()
        access_token = gdata.gauth.ae_load(access_token_key)       
        # authenticating here
        #gdocs.auth_token = access_token
    

    Another version could be this :

        #gdocs.auth_token = gdata.gauth.OAuthHmacToken(SETTINGS['CONSUMER_KEY'], 
        #                                               SETTINGS['CONSUMER_SECRET'], 
        #                                               access_token,
        #                                               access_token_key, 
        #                                               gdata.gauth.ACCESS_TOKEN) 
    

    as states google ‘s doc.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Currently, I'm trying to develop a rich internet application using Flash Builder 4 Beta
Here's my problem. I'm currently trying to develop a .Net Compact Framework 2.0 application
I'm currently trying to develop an android application in eclipse(java) which shows some jokes
I'm currently trying to develop a method to get a overview of all my
I am currently trying to develop a basic pixel editor application to build up
I am currently trying to develop a simple plugin for visual studio 2008 using
I am currently trying to develop an application which uses Skype API to call
I'm currently using the iOS 5 SDK trying to develop my app. I'm trying
I an trying to develop a windows application using C# that can play streamed
i am currently trying to develop an JNI(Native) component for a Java application, I

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.