Google API login

google-analytics, php

Solution

So after browsing more groups, a friend found out that you need to approve your account before you start fetching data for the first time at this url

Problem

I try to fetch data from google analytics using the google api class in php. I checked serval google groups and found out that the error comes most of the time when Curl is off and SSL is off too, but I checked in the phpinfo() and booth are running. Anyone an idea what it could be? On my local server it's running, but on the webserver it's not running. ``` <br /> <b>Fatal error</b>: Uncaught exception 'Exception' with message 'GAPI: Failed to authenticate user. Error: &quot;Error=BadAuthentication Url=https://www.google.com/accounts/ServiceLogin?service=analytics#Email=mail Info=WebLoginRequired &quot;' in /home/express/public_html/loggedIn/gapi.class.php:418 Stack trace: #0 /home/express/public_html/loggedIn/gapi.class.php(62): gapi-&gt;authenticateUser('mail', 'pw') #1 /home/express/public_html/loggedIn/request.php(10): gapi-&gt;__construct('mail', 'pw') #2 {main} thrown in <b >/home/express/public_html/loggedIn/gapi.class.php</b> on line <b>418</b><br /> ```

Original source