Hey Sean,

What scope are you using?

-Vic



On Tue, Dec 14, 2010 at 4:46 PM, Sean <[email protected]> wrote:

> I'm trying to request a list of worksheets in a spreadsheet.  I'm using
> 3-legged OAuth to give a google app engine app permission to access a google
> spreadsheet.  I've tried this with both a google apps account and a non-apps
> google account with the same result.
>
> I'm following the developers guide at this section:
>
>
> https://code.google.com/apis/spreadsheets/data/3.0/developers_guide.html#RetrievingWorksheetFeeds
>
> I am able to request a list of spreadsheets from the authorized account and
> log out the entry data for each spreadsheet.  I select a particular
> spreadsheet (based on title) and I grab the URL for the worksheets meta feed
> by grabbing the link element with ref="
> http://schemas.google.com/spreadsheets/2006#worksheetsfeed";.  In my case,
> this gives me:
>
>
> https://spreadsheets.google.com/feeds/worksheets/0Ag5aveu4M6rydGZTZW1rT1hia3ZEeFBjRU9UcDJtY1E/private/full
>
> So far so good, at least as it compares to what the dev guide says.
>
> I then try to issue a GET using that worksheet URL, in the hope that it
> returns an Atom feed for the worksheets.  Instead I see the following error
> in my log:
>
> Dec 14, 2010 9:29:06 PM org.apache.commons.httpclient.HttpMethodDirector
> processWWWAuthChallenge
> WARNING: Unable to respond to any of these challenges: {authsub=AuthSub
> realm="https://www.google.com/accounts//AuthSubRequest"}
>
> and I catch a "com.google.api.client.http.HttpResponseException: 401"
> at com.google.api.client.http.HttpRequest.execute(HttpRequest.java:209)
>
> I'm trying to figure out where the problem is as I'm able to add/modify
> spreadsheets using the same OAuth tokens.  I'm using the same signed
> transport object for retrieving the spreadsheet metafeed as well as the
> worksheet metafeed.
>
> Based on this Apps API thread:
> http://www.google.com/support/forum/p/apps-apis/thread?tid=0161af1874fc7d11&hl=en,
> I'm not sure if I'm running into a similar scoping problem.
>
> Also, from the dev guide, it states that I need to issue the GET request
> with the "appropriate authorization header".  Is this referring to the
> signed transport request that I'm already using?
>
> Thanks.
>
> Sean
>

Reply via email to