Hi Alex, Accessing a Spreadsheet's content requires the Spreadsheets API. You'll also need a valid token for https://spreadsheets.google.com/feeds/. The easiest way to do this would be to request a multi-scoped token for both the DocList and Spreadsheets API.
Eric On Tue, Aug 4, 2009 at 11:21 AM, alex <a...@manymoon.com> wrote: > > I am trying to create spreadsheet and populate some entries and i am > getting Token invalid - AuthSub token has wrong scope 401 error. All > the URL i am using are https, but i get error right after i create > spreadsheet and try to request its worksheet or try to create > worksheet. > > Here is example: > > DocsService service = new DocsService("Example"); > service.setAuthSubToken(token, null); > DocumentListEntry newEntry = SpreadsheetEntry() > > newEntry.setTitle(new PlainTextConstruct("example")); > newEntry = service.insert(new URL("https://docs.google.com/feeds/ > documents/private/full"), newEntry); > > Up to this point everything is fine and spreadsheet created but then > if i request worksheets i will get invalid token > > List<WorksheetEntry> worksheets = newEntry.getWorksheets(); //error > here > > > i try to insert worksheet instead and still getting error: > > WorksheetEntry worksheet = new WorksheetEntry(); > worksheet.setTitle(new PlainTextConstruct("entries")); > worksheet.setRowCount(200); > worksheet.setColCount(7); > > URL worksheetFeedUrl = newEntry.getWorksheetFeedUrl(); > worksheet = service.insert(worksheetFeedUrl, worksheet); > > The error will probably be thrown once i try to insert the ListEntries > also. > > Any help will be appreciated. > > Thanks > > > --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---