title: Download url not working in Google Drive API PHP
body: <p>I am having issue with the Google Drive API, i was able to fetch the files using API But i can't download via this link. I guess, must some auth, but i have used refresh tokens to authenticate.Please see below for my code</p>
  
  <pre><code>$this-&gt;load-&gt;library('google-api-php-client/src/Google_Client');
                  include APPPATH . '/libraries/google-api-php-client/src/contrib/Google_DriveService.php';
                  // Library Files Configuration to get access token and Refresh Token
                  $client = new Google_Client();
                  $client-&gt;setAccessType('offline'); // default: offline
                  $client-&gt;setApplicationName('xxx'); //name of the application
                  $client-&gt;setClientId('yyyy'); //insert your client id
                  $client-&gt;setClientSecret('zzz'); //insert your client secret
                  $client-&gt;setScopes(array('https://www.googleapis.com/auth/drive'));
                  $service = new Google_DriveService($client);
  
                  $client-&gt;refreshToken($drive_data-&gt;refreshtoken);
                  $client-&gt;getAccessToken();
                  $parameters = array();
                  $files = $service-&gt;files-&gt;listFiles($parameters);
  foreach ($files['items'] as $key =&gt; $items)
                              {
  &lt;a href="&lt;?php echo $files['items'][$key]['downloadUrl'];  ?&gt;"&gt;Download&lt;/a&gt;
  }
  </code></pre>
  
  <p>Anybody knows how to get the download url with authentication?</p>