title: Copy file with Permissions in Google Drive API PHP
body: <p>I'm trying to copy a file with a service account, and then grant access to my personal account. The copy seems to be working correctly which it seems to be copying the file to the google drive service account.  So it's returning and ID that was created, but it fails when trying to insert the permissions on the file. says undefined method insert. </p>
  
  <p>Here's what I have now</p>
  
  <pre><code>private function copy_base_file( $new_file_name )
  {
      $service = $this-&gt;get_google_service_drive( $this-&gt;get_google_client() );
      $origin_file_id = "{id of file to copy}";
      $copiedFile = new Google_Service_Drive_DriveFile();
      $copiedFile-&gt;setName($new_file_name);
      try {
          $response = $service-&gt;files-&gt;copy($origin_file_id, $copiedFile);
          $ownerPermission = new Google_Service_Drive_Permission();
          $ownerPermission-&gt;setEmailAddress("{myemailhere}");
          $ownerPermission-&gt;setType('user');
          $ownerPermission-&gt;setRole('owner');
          $service-&gt;permissions-&gt;insert("{sheet_id_here}", $ownerPermission, 
              ['emailMessage' =&gt; 'You added a file to ' .
              static::$applicationName . ': ' . "Does this work"]);
      } catch (Exception $e) {
          print "An error occurred: " . $e-&gt;getMessage();
      }
  }
  </code></pre>