OK, I figured it out (how to get an AuthSub token for worksheet list feeds which can be used in an App Engine app). I'll post a full how-to-do-it later, but in brief, you need to use these feed urls typically as an argument to GenerateAuthSubURL():
for spreadsheet feeds: http://spreadsheets.google.com/feeds/spreadsheets/private/full for a worksheet list feed: http://spreadsheets.google.com/feeds/ for doc feeds (e.g. list of spreadsheets in a named folder): http://docs.google.com/feeds/documents/private/full Concatenate those into a single string with a space between them and then pass it to GenerateAuthSubURL() to get an AuthSub multi- token that can be used to access all of the feeds. Regards, Bill Hayes On Sep 18, 8:12 pm, "Bill H." <bhaye...@gmail.com> wrote: > Hi > I have a python spreadsheet processing program that I'm converting > from a desktop app to a an App Engine app and therefore need to use > AuthSub. > I have it working for spreadsheets and documents via a multiple > scope token, but when I try to get a worksheet feed I get a > 'Token invalid - AuthSub token has wrong scope' 401 error. > > The only way I can get it to work is by getting a token for > specific worksheets, e.g. > feed_url = 'http://spreadsheets.google.com/feeds/worksheet/ > 0Ap5lY_JbN2hUcjNNQm1iTVV0ZWRYY2J5OExrSXJqTnc/private/full > or using a public version (but my ss's are private so this does not > help): > feed_url = 'http://spreadsheets.google.com/feeds > > None of the normal feed_url's work: > spreadsheets.google.com/feeds/spreadsheets/private/full > spreadsheets.google.com/feeds/private/full > spreadsheets.google.com/feeds/worksheets/private/full > > I generate the auth link using: > auth_sub_url = client.GenerateAuthSubURL(next, feed_url, > secure=False, session=True) > > Then extract the returned token: > auth_token = gdata.auth.extract_auth_sub_token_from_url > (self.request.uri) > ss_client = gdata.spreadsheet.service.SpreadsheetsService() > session_token = ss_client.upgrade_to_session_token(auth_token) > ss_client.current_token = session_token > ws_feed = ss_client.GetWorksheetsFeed(<same key as in feed url>) > > What feed_url should I be using? > > Thanks in advnace. > Bill Hayes --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Google Docs Data APIs" group. To post to this group, send email to Google-Docs-Data-APIs@googlegroups.com To unsubscribe from this group, send email to google-docs-data-apis+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/Google-Docs-Data-APIs?hl=en -~----------~----~----~----~------~----~------~--~---