title: Google Sheets, "The request is missing a valid API key"
body: <p>I am trying to use the <code>Google Sheets API</code>. The problem is, once I call my script function on the google spreadsheet, I get the following error:</p>
  <blockquote>
  <p>API call to sheets.spreadsheets.values.get failed with error: The request is missing a valid API key. (line 5).</p>
  </blockquote>
  <p>where <code>line 5</code> in the script looks like this:</p>
  <pre><code>var values = Sheets.Spreadsheets.Values.get(spreadsheetId, rangeName).values;
  </code></pre>
  <p>and <code>spreadsheetId</code> and <code>rangeName</code> are defined in the first lines.</p>
  <p>I think the problem might be that I did not copy the API key anywhere, but I really do not understand where and how I can do it.</p>
  <p>I call the function just using <code>= function()</code>.</p>