Hi, Saurabh.
It looks like OAuth is failing. Did you update the client_secrets.json file with your client ID, client secret and redirect URL (
http://your/path/adsense-sample.php)?
Check out the
README file for all of the steps necessary to get the examples running.
Let me know if you still experience difficulties.
Thanks,
Donovan McMurray, AdSense API Team
ref:_00D1U1174p._5001UEHK6Y:ref