Getting Uncaught exception. Can't figure out!

53 views
Skip to first unread message

Gagan Singh

unread,
Sep 30, 2013, 1:12:43 PM9/30/13
to adsen...@googlegroups.com
My adsense management code have run fine for a year. All of sudden I'm getting this error. I have changed my API key numerous time but to no avail. Can some help out?

 Uncaught exception 'Google_ServiceException' with message 'Error calling GET https://www.googleapis.com/adsense/v1.3/reports?startDate=2013-09-24&endDate=2013-09-24&metric=CLICKS&metric=EARNINGS&dimension=DATE&sort=DATE&key=AIzaSyCJtO1ccolspxRFaKUS-FsjuYI5FQttHnU: (400) Bad Request' in /home/namehidden/public_html/stats2/google_api/src/io/Google_REST.php:66 Stack trace: #0 /home/namehidden/public_html/stats2/google_api/src/io/Google_REST.php(36): Google_REST::decodeHttpResponse(Object(Google_HttpRequest)) #1 /home/namehidden/public_html/stats2/google_api/src/service/Google_ServiceResource.php(186): Google_REST::execute(Object(Google_HttpRequest)) #2 /home/namehidden/public_html/stats2/google_api/src/contrib/Google_AdSenseService.php(849): Google_ServiceResource->__call('generate', Array) #3 /home/namehidden/public_html/stats2/index.php(395): Google_ReportsServiceResource->generate('2013-09-24', '2013-09-24', Array) #4 /home/namehidden/public_html/stats2/index.php(533): insert_adsense_stats('2013-09-24', Resource id #6) # in /home/namehidden/public_html/stats2/google_api/src/io/Google_REST.php on line 66

Jose Alcérreca (AdSense API Team)

unread,
Oct 1, 2013, 10:23:17 AM10/1/13
to adsen...@googlegroups.com
Hey Gagan,

It looks right! If you try the APIs explorer, you might see more information with an error explanation:


Remember to authenticate with the same account you're using to make the requests.

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