title: Reading messages from Gmail, in PHP, using Gmail API
body: <p>I have donwloaded new Gmail API source code from Google PHP client library.</p>
  <p>I inititalized the service using:</p>
  <pre class="lang-php prettyprint-override"><code>set_include_path(&quot;./google-api-php-client-master/src/&quot;.PATH_SEPARATOR.get_include_path());
      
  require_once 'Google/Client.php';   
  require_once 'Google/Service/Gmail.php';
  
  $client = new Google_Client();
  $client-&gt;setClientId($this-&gt;config-&gt;item('gmailapi_clientid'));
  $client-&gt;setClientSecret($this-&gt;config-&gt;item('gmailapi_clientsecret'));
  $client-&gt;setRedirectUri(base_url('auth'));
  $client-&gt;addScope('email');
  //$client-&gt;addScope('profile');     
  $client-&gt;addScope('https://mail.google.com');           
  $client-&gt;setAccessType('offline');
  
  $gmailService = new Google_Service_Gmail($client);
  </code></pre>
  <p>What should I do next? How to read Gmail messages using Gmail API PHP library?</p>