title: Unable to see the uploaded file on Google drive
body: <p>I am using PHP and Service Account to connect and upload a test file to Google drive. It does not give me any error but when I login using my account into google drive and check for this file. I dont find it. Why? 
  Please help.</p>
  
  <p>I've used the following code: </p>
  
  <pre><code>&lt;!DOCTYPE html&gt;
  &lt;html&gt;
      &lt;head&gt;
      &lt;/head&gt;
      &lt;body&gt;
  &lt;?php 
  set_include_path( get_include_path() . PATH_SEPARATOR . 'google-api-php-client-master/src' );
  
  require_once 'google-api-php-client-master/src/Google/Client.php';
  require_once 'google-api-php-client-master/src/Google/Service/Drive.php';
  require_once "google-api-php-client-master/src/Google/Service/Oauth2.php";
  session_start();
  
  $DRIVE_SCOPE = 'https://www.googleapis.com/auth/drive';
  $SERVICE_ACCOUNT_EMAIL = '&lt;xyz&gt;@developer.gserviceaccount.com';
  $SERVICE_ACCOUNT_PKCS12_FILE_PATH = '&lt;abc&gt;-privatekey.p12';
  
  $key = file_get_contents($SERVICE_ACCOUNT_PKCS12_FILE_PATH);
  $auth = new Google_Auth_AssertionCredentials(
      $SERVICE_ACCOUNT_EMAIL,
      array($DRIVE_SCOPE),
      $key);
  $client = new Google_Client();
  //$client-&gt;setUseObjects(true);
  $client-&gt;setAssertionCredentials($auth);
  $service = new Google_Service_Drive($client);
  
  //Insert a file
  $file = new Google_Service_Drive_DriveFile();
  $file-&gt;setTitle('My document');
  $file-&gt;setDescription('A test document');
  $file-&gt;setMimeType('text/plain');
  
  $data = file_get_contents('My document.txt');
  
  $createdFile = $service-&gt;files-&gt;insert($file, array(
        'data' =&gt; $data,
        'mimeType' =&gt; 'text/plain',
          'uploadType' =&gt; 'media'
      ));
  print_r($createdFile);
  
  ?&gt;
  
      &lt;/body&gt;
  &lt;/html&gt;
  </code></pre>