Jojo, I am neither a Python user nor an AuthSub user, but I can tell you
that the path to mastery is to bite the bullet and get your hands dirty with
the raw HTTP and XML as per the protocol documents.  The hard road.

It's the old maxim - it's pointless trying to use an abstraction when you
don't understand the thing being abstracted.

This is especially true of the language-specific libraries which Google
provide for the Spreadsheets API, which are very thin abstractions of the
protocols anyhow. Especially given the state of those libraries with respect
to documentation, orthogonality of examples with the library itself, and
bugs.  If Google actually run any kind of automated tests on their
language-specific libraries, it doesn't show.

So anyhow, time to:

... crack your head and synthesise the following documents in your own mind:

Authentication Overview:
http://code.google.com/apis/gdata/docs/auth/overview.html
AuthSub: http://code.google.com/apis/accounts/docs/AuthSub.html
GData (Guide): http://code.google.com/apis/gdata/docs/developers-guide.html
GData (Reference): http://code.google.com/apis/gdata/docs/2.0/reference.html
Spreadsheets (Guide):
http://code.google.com/apis/spreadsheets/data/3.0/developers_guide.html
Spreadsheets (Reference):
http://code.google.com/apis/spreadsheets/data/3.0/reference.html

... manually construct your requests with CURL until it works and you
understand what is going on

http://code.google.com/apis/gdata/articles/using_cURL.html

... apply your new understandings to what the python library alleges it will
do for you

... compare HTTP requests/responses between your successful CURL examples
and your unsuccessful python lib examples

... and likely as not file a bug against the spreadsheets service or its
documentation

http://code.google.com/a/google.com/p/apps-api-issues/issues/list

... or against the python library itself

http://code.google.com/p/gdata-python-client/issues/list


Give yourself a few days before you actually get back to *your*
problem-domain.  If you find a bug in the python library, spend your
energies on a patch (hey, Python's dynamic is it not?), rather than  railing
ineffectually to get your very legitimate and pressing issue actually
addressed by the people who are actually responsible - they don't actually
exist.


cheers,
David.


On Tue, Jun 28, 2011 at 1:48 AM, Jojo <[email protected]> wrote:

> Hi guys, since several days I'm trying to make work web authentication
> in my web application.
> My main focus is retrieve a list of spreadsheets that I share with
> other users.
> I have tried several ways, but nothing works fine. I get always the
> same error "NonAuthSubToken".
>
> I'm following this documentation:
>
> http://code.google.com/intl/it-IT/apis/spreadsheets/data/1.0/developers_guide_python.html
> Now I think maybe I'm using the wrong version of the library.
> I have followed every step very carefully, but IT DOES NOT WORK!!! I
> do not know what to do.
>
> The exception is raised when I attempt to upgrade the token. I doubt
> the token returned IS NOT an AuthSub token, but if I'm right, I don't
> understand why Google return a different token.
>
> This is a token Google returned to my page: 1%2FNLYaWdMgynUlKOOlWmf04-
> cCXAfeMpyFFqedmZ0rLK0
> Do you think the format is right? I am considering all the hypotheses
> because I am lost.
>
> Please I need some help!

Reply via email to