oAuth on Server

30 views
Skip to first unread message

kprimdal

unread,
Feb 17, 2012, 11:32:25 PM2/17/12
to AdSense API Forum
Hi,

I'm right now trying to make a personal app which gets my yesterday
adsense earnings. But it is the server which is going to fetch this,
so is this even possible when I have to oAuth to be able to login ?

And is there any good tutorials anywhere how I do this in PHP ?

Silvano Luciani

unread,
Feb 20, 2012, 6:04:03 AM2/20/12
to AdSense API Forum
Hello there,

you can find examples of usage of the AdSense Management API for the
PHP programming language inside the source code of the Google API PHP
Client Library:
http://code.google.com/p/google-api-php-client/source/browse/#svn%2Ftrunk%2Fexamples%2Fadsense

For your use case, you will need to enable offline access in your
authorization request:
http://code.google.com/apis/accounts/docs/OAuth2WebServer.html#offline

If you use the Google API PHP Client Library the offline access is
enabled by default, so the only thing that you will need to do is
authorize the application the first time you execute it.

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
Reply all
Reply to author
Forward
0 new messages