Thursday, March 22, 2012

Digest for adsense-api@googlegroups.com - 6 Messages in 2 Topics

Group: http://groups.google.com/group/adsense-api/topics

    Silvano Luciani <silvano.luciani@google.com> Mar 21 02:39AM -0700  

    Hello Vaibhav,
     
    you can find all the information you need to implement the
    authorization flow here:
    https://developers.google.com/accounts/docs/OAuth2
     
    We've recently added a couple of tutorials on OAuth 2.0 to the AdSense
    API documentation:
    https://developers.google.com/adsense/tutorials/
     
    You will probably find useful to go through the generic tutorial,
    which explains the flows for web applications:
    https://developers.google.com/adsense/tutorials/oauth-generic
     
    Let us know if you have any additional questions!
     
    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
     

     

    Vaibhav <asfe-next@oversee.net> Mar 21 12:52PM -0700  

    thanks.
    Looks like I need to
    1. login using email and passwd
    2. then do a GET request to /o/oauth2/auth/ with parameters
    3. then do a POST request to /o/oauth2/token with auth code and other
    parameters to get the access_token
     
    Do you you know which login url (step 1 above) should I use inorder to
    login?
     
     
    On Tuesday, March 20, 2012 2:55:40 PM UTC-7, Vaibhav wrote:

     

    Vaibhav <asfe-next@oversee.net> Mar 21 07:33PM -0700  

    I am going to manually get the auth code as a one time thing and I am
    hoping that I will never require to get another auth code ( unless if the
    user gets revoked of course )
     
    Then use the auth code to get access_token and refresh token using
    /o/oauth2/token url
    Then I use the latest access_token for my API queries.
    When my access_token expires I use the refresh_token to get a new
    access_token and continue with my API queries using the new access_token.
    Basically, I use same refresh_token whenever my access_token expires.
     
    The questions is - How long can I use the refresh_token? Does it ever
    expire? The time it becomes invalid is when that user gets revoked from
    using the application. Is that the only case when it expires/unusable?
     
     
    On Wednesday, March 21, 2012 2:39:12 AM UTC-7, Silvano Luciani wrote:

     

    Silvano Luciani <silvano.luciani@google.com> Mar 22 02:05AM -0700  

    Hello Vaibhav,
     
    about your first question, you just need to redirect to 'https://
    accounts.google.com/o/oauth2/auth' (adding the appropriate set of
    query string parameters).
    If the user is not already logged in with their Google account, they
    will be shown an authentication panel to log in before granting
    permissions to your application.
     
    About your second question, you can use the refresh token until it is
    revoked, it never expires. The refresh token can be revoked manually
    by the user or programmatically by an application, you can find more
    details here:
    https://developers.google.com/accounts/docs/OAuth2WebServer#tokenrevoke
     
    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
     

     

    Eric Haskins <eric@voodoo.com> Mar 21 11:41AM -0700  

    I going over the docs and all the examples are tailored to the Web
    Application. I was wondering if anyone has done a Server to Server
    OAuth2 for the Management API yet?? But this:
     
    "Libraries should abstract these specifics from your application.
    Again, developers are strongly encouraged to attempt to use an
    existing library rather than building your own support for server-to-
    server interactions"
     
    Does seem to point where in Googles provided library is the code for
    Abstracting it. Since a server to server app cant use a redirect url
    Im kinda lost in translation I think
     
    Thx
    Eric

     

You received this message because you are subscribed to the Google Group adsense-api.
You can post via email.
To unsubscribe from this group, send an empty message.
For more options, visit this group.

--
You received this message because you are subscribed to the Google Groups "AdSense API Forum" group.
To post to this group, send email to adsense-api@googlegroups.com.
To unsubscribe from this group, send email to adsense-api+unsubscribe@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/adsense-api?hl=en.

No comments:

Post a Comment