title: How can I change the owner of a Google Sheets spreadsheet?
body: <p>With the following, I can programmatically create a spreadsheet in Google sheets, but the owner of the sheet is the developer account (a crazy string ending in "gserviceaccount.com"), and my normal account can't view the spreadsheet.  What else do I need to do in order to add Google users to the read/write permissions?</p>
  
  <pre class="lang-py prettyprint-override"><code>from oauth2client.service_account import ServiceAccountCredentials
  from googleapiclient import discovery
  
  # ... json_key is the json blob that has the credentials
  scope = ['https://spreadsheets.google.com/feeds']
  credentials = ServiceAccountCredentials.from_json_keyfile_dict(json_key, scope)
  service = discovery.build('sheets', 'v4', credentials=credentials)
  
  spreadsheet = {
    "properties": {"title": "my test spreadsheet"}
  }
  
  service.spreadsheets().create(body=spreadsheet).execute()
  </code></pre>
  
  <p>Edit:<br>
  I tried changing the scope to <code>['https://www.googleapis.com/auth/drive']</code> but the answer below still doesn't work for me.  When I run  </p>
  
  <pre><code>print [xx for xx in dir(service) if not xx.startswith('_')]
  </code></pre>
  
  <p>I get</p>
  
  <pre><code>['new_batch_http_request', u'spreadsheets']
  </code></pre>
  
  <p>In other words, <code>permissions()</code> isn't a method in <code>service</code> as I have service defined.  What should I be doing differently?</p>