Issue 594 in gdata-python-client: OAuth2 authentication for older class gdata.spreadsheet.service.SpreadsheetsService

170 views
Skip to first unread message

gdata-pyt...@googlecode.com

unread,
Feb 8, 2012, 3:52:59 PM2/8/12
to gdata-python-client-...@googlegroups.com
Status: New
Owner: ----
Labels: Type-Defect Priority-Medium

New issue 594 by victorja...@gmail.com: OAuth2 authentication for older
class gdata.spreadsheet.service.SpreadsheetsService
http://code.google.com/p/gdata-python-client/issues/detail?id=594

What steps will reproduce the problem?
1. gd_client = gdata.spreadsheet.service.SpreadsheetsService()
2. token = gdata.gauth.OAuth2Token( ... )
3. token.authorize(gd_client)
4. gd_client.GetSpreadsheetsFeed()

Error: Exception Value:
new_request() takes exactly 1 non-keyword argument (2 given)
Exception Location:
/home/victor/.virtualenvs/locaweb/lib/python2.6/site-packages/gdata-2.0.16-py2.6.egg/atom/http_interface.py
in perform_request, line 148

What is the expected output? What do you see instead?

I want to get a list of Spreadsheets

What version of the product are you using?

2.0.16

Please provide any additional information below.

Problem: I want to use the class
gdata.spreadsheet.service.SpreadsheetsService authenticated with OAuth2. Is
it possible ?
I read an other issue that the OAuth2 only works with new client class
gdata.spreadsheets.client.SpreadsheetsClient. It works for me using the new
class. My problem: The new class SpreadsheetsClient is imcomplete at the
moment and not exists the documentation for it. I want to use methods like:
AddWorksheet, UpdateWorksheet, DeleteWorksheet, UpdateCell and others,
available only in older class (SpreadsheetsService).

Should i change the type of the authentication (OAuth2 to OAuth) ?

There is any way to make that new version of the class SpreadsheetsClient
use the basic operations of spreadsheets, like updateCell, updateWorksheet
and others, it is really imcomplete at the moment ? the basic operation
UpdateCell is not available for the new Client ?

Help me people, i want to use the integration of Google Docs in my system.


gdata-pyt...@googlecode.com

unread,
Feb 13, 2012, 10:39:04 AM2/13/12
to gdata-python-client-...@googlegroups.com
Updates:
Status: WontFix

Comment #1 on issue 594 by afs...@google.com: OAuth2 authentication for

older class gdata.spreadsheet.service.SpreadsheetsService
http://code.google.com/p/gdata-python-client/issues/detail?id=594

Hi, thanks for this.

Yes, unfortunately if you want to use the old service framework-based
class, you will have to use OAuth1, not OAuth2.0. We won't be adding
OAuth2.0 support to the old service framework.

gdata-pyt...@googlecode.com

unread,
Dec 19, 2012, 10:23:07 AM12/19/12
to gdata-python-client-...@googlegroups.com

Comment #2 on issue 594 by eduardos...@gmail.com: OAuth2 authentication for
older class gdata.spreadsheet.service.SpreadsheetsService
http://code.google.com/p/gdata-python-client/issues/detail?id=594

What is the old service framework and what is the new one?

There's no mention about it in here:
https://developers.google.com/gdata/articles/python_client_lib

gdata-pyt...@googlecode.com

unread,
Mar 19, 2015, 9:53:25 PM3/19/15
to gdata-python-client-...@googlegroups.com

Comment #3 on issue 594 by peter.he...@gmail.com: OAuth2 authentication for
older class gdata.spreadsheet.service.SpreadsheetsService
https://code.google.com/p/gdata-python-client/issues/detail?id=594

If you writes an OAuth 2.0 Bearer auth header directly to the request it
will allow you to continue to use the older
gdata.spreadsheet.service.SpreadsheetsService style client code with the
new OAuth 2.0 access tokens.

Init your client like this:
client = gdata.spreadsheet.service.SpreadsheetsService(
additional_headers={'Authorization' : 'Bearer %s' %
credentials.access_token})

I have put a full working solution in my SO answer here
http://stackoverflow.com/a/29157967/298650



--
You received this message because this project is configured to send all
issue notifications to this address.
You may adjust your notification preferences at:
https://code.google.com/hosting/settings

gdata-pyt...@googlecode.com

unread,
Mar 22, 2015, 10:44:52 PM3/22/15
to gdata-python-client-...@googlegroups.com

Comment #4 on issue 594 by peter.he...@gmail.com: OAuth2 authentication for
older class gdata.spreadsheet.service.SpreadsheetsService
https://code.google.com/p/gdata-python-client/issues/detail?id=594

If you write an OAuth 2.0 Bearer auth header directly to the request it
Reply all
Reply to author
Forward
0 new messages