title: Google Simple API Access - Authorization required, but how?
body: <p>I'm trying write a standalone perl app that list all my tasks stored in Google Tasks. I'm led to believe I can use what Google call "Simple API Access" because it's just my tasks and it's read only.</p>
  
  <p>So I did the following:</p>
  
  <pre><code>#!perl
  use LWP;
  my $browser = LWP::UserAgent-&gt;new;
  my $list = "Iyrhxu8sRTVOhE4hUBr4W1kwNTI6MDow";
  my $key = "&lt;api key removed&gt;";
  my $url = "https://www.googleapis.com/tasks/v1/lists/$list/tasks?pp=1&amp;key=$key";
  print $browser-&gt;get($url)-&gt;content;
  </code></pre>
  
  <p>In return, I get:</p>
  
  <pre><code>{
   "error": {
    "errors": [
     {
      "domain": "global",
      "reason": "required",
      "message": "Login Required",
      "locationType": "header",
      "location": "Authorization"
     }
    ],
    "code": 401,
    "message": "Login Required"
   }
  }
  </code></pre>
  
  <p>Unfortunately I've no idea what authorization it wants at this point. I tried replacing the last line with:</p>
  
  <pre><code>my $auth = "...";
  print $browser-&gt;get($url, "Authorization", $auth)-&gt;content;
  </code></pre>
  
  <p>and using the Google listed Client ID, Email address and Client Secret listed in the API Console - but they all gave <code>Invalid Credentials</code>.</p>
  
  <p>Can anyone help?</p>