title: Google People API unauthorized
body: <p>I want to get my own Google Contacts so I read up on the <a href="https://developers.google.com/people" rel="nofollow noreferrer">People API documentation</a>, on the &quot;<strong>Authorize Request</strong>&quot; section under the &quot;<strong>Acquiring and using an API key</strong>&quot; it says:</p>
  <blockquote>
  <p><strong>API keys</strong>: A request that does not provide an OAuth 2.0 token must send
  an API key. The key identifies your project and provides API access,
  quota, and reports.</p>
  <p>The API supports several types of restrictions on API keys. If the API
  key that you need doesn't already exist, then create an API key in the
  Console by clicking <strong>Create credentials &gt; API key</strong>. You can restrict the
  key before using it in production by clicking <strong>Restrict key</strong> and
  selecting one of the <strong>Restrictions</strong>.</p>
  </blockquote>
  <p>So that seems easy enough, I went to the project page and created an unrestricted API Key, then I can create this request URL: <a href="https://people.googleapis.com/v1/people/me?key=API_KEY&amp;personFields=names" rel="nofollow noreferrer">https://people.googleapis.com/v1/people/me?key=API_KEY&amp;personFields=names</a>, with the API key just in the URL, as this statement suggest.</p>
  <blockquote>
  <p>After you have an API key, your application can append the query parameter key=<strong>yourAPIKey</strong> to all request URLs.</p>
  </blockquote>
  <p>But when I run the URL I posted before it returns this:</p>
  <pre><code>{
      &quot;error&quot;: {
          &quot;code&quot;: 401,
          &quot;message&quot;: &quot;The request does not have valid authentication credentials.&quot;,
          &quot;status&quot;: &quot;UNAUTHENTICATED&quot;
      }
  }
  </code></pre>
  <p>What am I doing wrong? :(</p>