Hi
I have some problems with Authsub and spreadsheet service

I'm running my code on appengine.


I manage to insert rows but does not manage to save the AuthSub Token
and reuse it.


1) First I grant access to spread sheet
secure = False
session = True
auth_sub_url =
gdata.auth.GenerateAuthSubUrl(next, 'https://spreadsheets.google.com/feeds/ ',
secure=secure, session=session, domain=domainToUse)
(I've tried http://....also)


2) Get a single use token:
single_use_token =
gdata.auth.extract_auth_sub_token_from_url(request.uri)

3) Upgrade to AuthSub with:
I've tried a couple of versions...
request_token = gdata.gauth.AuthorizeRequestToken(single_use_token,
request.uri)

or
token = gdata.gauth.AuthSubToken(single_use_token)

or
spread_service = gdata.spreadsheet.service.SpreadsheetsService()
spread_service.UpgradeToSessionToken(single_use_token)

4) I would lika to be able to reuse this token from the step above…
But I get an error on save
gdata.gauth.ae_save (?????, current_user.user_id())

One error I've got when I tried…

line 1157, in token_to_blob
'Unable to serialize token of type %s' % type(token))
UnsupportedTokenType: Unable to serialize token of type
<class 'gdata.auth.AuthSubToken'>


I've tried to get find a sample on how this can be done but does not
find any.


Hope someone can explaine what's wrong with my thinking


Thanks

Reply via email to