title: GAPI: Failed to request report data. Error: "GDatainsufficientPermissionsUser does not have sufficient permissions for this profile
body: <p>I'm getting following error while fetching google analytics reports </p>
  
  <p><strong>"GAPI: Failed to request report data. Error: "GDatainsufficientPermissionsUser does not have sufficient permissions for this profile."</strong></p>
  
  <p>sample code is look like below.</p>
  
  <pre><code>       &lt;?php
  define('ga_email','test@gmail.com');
  define('ga_password','test');
  define('ga_profile_id','999999999');
  
  require 'gapi.class.php';
  
  $ga = new gapi(ga_email,ga_password);
  
  $ga-&gt;requestReportData(ga_profile_id,array('firefox','25.0.1'),array('pageviews','visits'));
  ?&gt;
  &lt;table&gt;
  &lt;tr&gt;
    &lt;th&gt;Browser &amp;amp; Browser Version&lt;/th&gt;
    &lt;th&gt;Pageviews&lt;/th&gt;
    &lt;th&gt;Visits&lt;/th&gt;
  &lt;/tr&gt;
  &lt;?php
  foreach($ga-&gt;getResults() as $result):
  ?&gt;
  &lt;tr&gt;
    &lt;td&gt;&lt;?php echo $result ?&gt;&lt;/td&gt;
    &lt;td&gt;&lt;?php echo $result-&gt;getPageviews() ?&gt;&lt;/td&gt;
    &lt;td&gt;&lt;?php echo $result-&gt;getVisits() ?&gt;&lt;/td&gt;
  &lt;/tr&gt;
  &lt;?php
  endforeach
  ?&gt;
  &lt;/table&gt;
  
  &lt;table&gt;
  &lt;tr&gt;
    &lt;th&gt;Total Results&lt;/th&gt;
    &lt;td&gt;&lt;?php echo $ga-&gt;getTotalResults() ?&gt;&lt;/td&gt;
  &lt;/tr&gt;
  &lt;tr&gt;
    &lt;th&gt;Total Pageviews&lt;/th&gt;
    &lt;td&gt;&lt;?php echo $ga-&gt;getPageviews() ?&gt;
  &lt;/tr&gt;
  &lt;tr&gt;
    &lt;th&gt;Total Visits&lt;/th&gt;
    &lt;td&gt;&lt;?php echo $ga-&gt;getVisits() ?&gt;&lt;/td&gt;
  &lt;/tr&gt;
  &lt;tr&gt;
    &lt;th&gt;Results Updated&lt;/th&gt;
    &lt;td&gt;&lt;?php echo $ga-&gt;getUpdated() ?&gt;&lt;/td&gt;
  &lt;/tr&gt;
  &lt;/table&gt;
  </code></pre>