title: Refresh a access token with google analytics api
body: <p>I try to refresh an access token with the google analytics API (php) but I've always the <strong>invalid_grant error</strong> ... that's my process:</p>
  
  <p><strong>1. I save a first acces token in my database with a offline request, the response is:</strong></p>
  
  <pre><code>{"access_token":"ya29.AHES6ZSPMUyKfx06Bw89LnlfRa5mEmwdthyCUj6D7bRmDcQ","token_type":"Bearer","expires_in":3600,"refresh_token":"1\/1XLO8PLs2Pb0NPs-T-lt07jWW_STBWYG3IGRB08ZbkA","created":1338810086}
  </code></pre>
  
  <p><strong>2. I check the token info, if "expires_in" &lt; 0 i try to refresh my token:</strong></p>
  
  <pre><code>if ($infoAt['expires_in'] &lt;= 0) {
   $row = $database-&gt;loadObject("SELECT refresh from token WHERE id=1");
   $client-&gt;refreshToken($row['refresh']);
  }
  </code></pre>
  
  <p>and I've a invalid_grant error ...</p>
  
  <p>any help ?
  Thanks a lot and sorry for my english ...</p>