Thursday, August 1, 2019

Digest for adsense-api@googlegroups.com - 2 updates in 1 topic

saurabh kumar <ksaurabh@ndtv.com>: Jul 30 11:59PM -0700

hi
 
we want to get adsense data report using api.
for that we have download the php client library for google api (
https://github.com/googleads/googleads-adsense-examples/tree/master/php-clientlib-1.x/v1.x
)
we have created the adsense_report.php and getting the below mentioned
error.
*Fatal error*: Uncaught InvalidArgumentException: missing the required
redirect URI in
C:\xampp\htdocs\Adsense\google-api-php-client-2.2.3\vendor\google\auth\src\OAuth2.php:651
Stack trace: #0
C:\xampp\htdocs\Adsense\google-api-php-client-2.2.3\src\Google\Client.php(340):
Google\Auth\OAuth2->buildFullAuthorizationUri(Array) #1
C:\xampp\htdocs\Adsense\google-api-php-client-2.2.3\adsense_report.php(109):
Google_Client->createAuthUrl() #2 {main} thrown in
*C:\xampp\htdocs\Adsense\google-api-php-client-2.2.3\vendor\google\auth\src\OAuth2.php* on
line *651*
 
if anyone can help in getting this resolved.
Ad Sense API <asapiforumadvisor@gmail.com>: Jul 31 01:32PM

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
You received this digest because you're subscribed to updates for this group. You can change your settings on the group membership page.
To unsubscribe from this group and stop receiving emails from it send an email to adsense-api+unsubscribe@googlegroups.com.