Requesting report data to my server

71 views
Skip to first unread message

Ad Reporter

unread,
Dec 14, 2015, 9:11:43 AM12/14/15
to AdSense API Forum
Hi,

We would like to request data from the Adsense API on a daily basis from our server (with a cron job). This process will grab the daily data and will store it in our DB for reporting purposes.


But it seems that it is requiring a google account approval (OAuth 2.0) in the browser and is not designed for server access.

How can we access the API from our server without a browser?

Hope someone can help us understand this,

Thanks

Dean Lukies (Adsense API Team)

unread,
Dec 14, 2015, 9:17:04 AM12/14/15
to AdSense API Forum
Hi,

you will need to do the browser auth once on your server then store a refresh token and use that for all future requests.

Take a look at the bit about STORE_ON_DISK in the readme.

thanks,
Dean
Reply all
Reply to author
Forward
0 new messages