title: Google Drive API - Copy an existing Spreadsheet file and set the "title" using JavaScript Client API
body: <p>I am working through the Google Javascript Client API Sample here:</p>
  
  <p><a href="https://code.google.com/p/google-api-javascript-client/source/browse/samples/authSample.html" rel="nofollow">https://code.google.com/p/google-api-javascript-client/source/browse/samples/authSample.html</a></p>
  
  <p>I am testing the Google Drive API, specifically the gapi.client.drive.files.copy method. I can get it to copy a file to my Drive, but I cannot get it to change the TITLE. Here is the code:</p>
  
  <pre><code>function makeApiCall() {
          gapi.client.load('drive', 'v2', function() {
            var request = gapi.client.drive.files.copy({
  
          "title": "New Landmax SS from API 5",
          "fileId": "0Ap_i-ZEiVl0pdDhYbFpxSFc5ZW1nYlMwV2poSXhTSGc"
            });
            request.execute(function(resp) {
                  result = resp;
            });
          });
        }
  </code></pre>
  
  <p>However, I can get it to work using the Google API Explorer, but it does not give the JavaScript Code. So it is probably a small syntax issue. Suggestions?  Unfortunately, none of the Drive API sample code uses the new(er) Javascript Client API, just server side.</p>