Wednesday, October 23, 2013

Digest for adsense-api@googlegroups.com - 5 Messages in 1 Topic

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

    Matteo Giampaolo <mgiampaolo@gmail.com> Oct 22 09:26AM -0700  

    Hi Jose
     
    but refresh token last "only" 3600 sec...isn't it?
    If Yes, how can I manage a "refresh" without human interaction?
     
    Thx

     

    "Jose Alcérreca (AdSense API Team)" <adsenseapiadvisor+jose@google.com> Oct 22 09:33AM -0700  

    Hi Matteo,
     
    Don't worry, the client libraries handle that for you. They will use your
    stored refresh token (that doesn't expire) to get a new access token (that
    expires in less than an hour).
     
    Cheers,
    Jose
     
    ---
    Jose Alcérreca
    Developer Relations
     
    Google UK Limited
    Registered Office: Belgrave House, 76 Buckingham Palace Road, London SW1W
    9TQ
    Registered in England Number: 3977902
     
    On Tuesday, 22 October 2013 17:26:51 UTC+1, Matteo Giampaolo wrote:

     

    Matteo Giampaolo <mgiampaolo@gmail.com> Oct 22 09:54AM -0700  

    Jose,
     
    I'm still having problem with client library....
    I though It could be possible managing in different way (example by storing
    authorization code and performing request like DFP API does...)
     
    here response I get from index.php (/google-api-php-client/examples)
     
    Runtime error: Could not json decode the token
    #0 /dati/google-api-php-client/src/Google_Client.php(172):
    Google_OAuth2->setAccessToken(NULL)
    #1 /dati/google-api-php-client/examples/adsense/AdSenseAuth.php(86):
    Google_Client->setAccessToken(true)
    #2 /dati/google-api-php-client/examples/adsense/index.php(52):
    AdSenseAuth->authenticate('sample_user')
     
    Sqlite seems could create DB (I find a examples.sqlite file in the
    directory)
     
    Is there a Deatailed guide on how to use/works example ?

     

    Matteo Giampaolo <mgiampaolo@gmail.com> Oct 22 10:33AM -0700  

    I've read several time the PHP instruction but there's no issue (only
    dowload files....)
    I've also tried creating DB (examples.sqlite and table auth) but then I get
    different errors
     
    Runtime error: SQLSTATE[HY000]: General error: 26 file is encrypted or is
    not a database
    #0 /dati/google-api-php-client/examples/adsense/AdSenseAuth.php(137):
    PDO->prepare('SELECT token FR...')
    #1 /dati/google-api-php-client/examples/adsense/AdSenseAuth.php(75):
    AdSenseAuth->getToken(Object(PDO))
    #2 /dati/google-api-php-client/examples/adsense/index.php(52):
    AdSenseAuth->authenticate('sample_user')
     
    is there any other action I've to perform (other than download library and
    create sqlite DB)?
     
    in the meanwhile I try to adrees adsense API with a "manually managed
    token"...
     
    thx
     
     
     
     
     
     
     
     

     

--
You received this message because you are subscribed to the Google Groups "AdSense API Forum" group.
To unsubscribe from this group and stop receiving emails from it, send an email to adsense-api+unsubscribe@googlegroups.com.
To post to this group, send email to adsense-api@googlegroups.com.
Visit this group at http://groups.google.com/group/adsense-api.
For more options, visit https://groups.google.com/groups/opt_out.

No comments:

Post a Comment