Hello Eric and Nikolai,
Sorry for the late answer but I was away, and thanks Nikolai for
helping out Eric!
On Mar 27, 7:59 pm, Eric Haskins <
e...@voodoo.com> wrote:
> Nikolai,
>
> It appears the Service Accounts lack the credentials to act on
> behalf of a user is what I am guessing and the reason that we get
> noAdSenseAccount Error.
Correct: Service Accounts can be used only when an end-user is not
involved, which is not the case of the AdSense APIs where you access
data on behalf of a user.
> So we are proceeding with the installed
> Application and a refresh token path. I do not like this route because
> of all people Google should understand the need for servers to be able
> to communicate without the requirement of user clicking a button
> especially if there are private and public keys in play. We will just
> have to create a function to generate an Auth Url in the case of
> accidental or unforseen token revocation.
I understand your point about automation, but the problem here is that
to access data on behalf of a user, you need their consent to do so.
Consequently they'll have to log in with their Google account to grant
permissions to your application at least once. If the application
requests offline access, it gets a refresh token that can be used to
renew the access token, so no need for clicks after the first time.
You could also set the option 'approval_prompt' to 'auto' so that a
given user sees the consent page for a given set of scopes only the
first time through the sequence.
>
> We are posing these pitfalls and ridiculous hurdles to our Partner
> Team in hopes google will make the wheel round again instead of
> reinventing it square. Although the next variation will most likely be
> an octagon ;-)
I'm sorry if this is your perception of what we are doing, but I don't
think that we are reinventing the wheel.
We are implementing a specification being developed within the IETF
OAuth WG, you can find the latest draft here:
http://tools.ietf.org/html/draft-ietf-oauth-v2-25
To ease the integration of the OAuth 2.0 flow, we are developing and
open sourcing client libraries for 9 programming languages:
http://code.google.com/apis/discovery/libraries.html
I hope you'll find the above useful, please let me know if there's
anything else we can do to support you.
Cheers,
Silvano
--
Silvano Luciani | Developer Programs Engineer
Google UK Limited
Registered Office: Belgrave House, 76 Buckingham Palace Road, London
SW1W 9TQ
Registered in England Number: 3977902
>