title: Receiving HTTP 401 Unauthorized when making a Google plus API call
body: <p>I'm trying to get the list of all my friends from the Google plus via API. The user on whose behalf I'm doing this operation previously authorized my request and I got the auth token. I've tried the following code in php:</p>
  
  <pre><code>function CallAPI() {
    $opts = array(
      "http" =&gt; array(
        "method" =&gt; "GET"
      )
    );
  
    $url = 'https://www.googleapis.com/plus/v1/people/me/people/visible?key=XXXX';    
    $context = stream_context_create($opts);
    $response = file_get_contents($url, false, $context);
    var_dump($response);
  }
  </code></pre>
  
  <p>but I keep receiving HTTP request failed! HTTP/1.0 401 Unauthorized. How can I prove that the user authorized my operations or what am I doing wrong?
  Any help is much appreciated.</p>