title: Accessing Google Calendar API without authorization via JavaScript
body: <p>I'm trying to access a public calendar (from Google Calendar) that contains national holidays:</p>
  
  <pre><code>calendarId: 'pt_br.brazilian#holiday@group.v.calendar.google.com'
  </code></pre>
  
  <p>As the calendar is public, I thought I would be able to access it using only the API Key:</p>
  
  <pre><code>function OnLoadCallback() {
      var config = {
          client_id: '32j4lk32j5kj342l5h.googleuser.com', //fake client id
          scope: 'https://www.googleapis.com/auth/calendar.readonly'
      };
      gapi.client.setApiKey('fId345AM20HXXXXXXXXXXXXXXXXgT3f9kyp2REfkaw2'); //fake api key
      gapi.client.load('calendar', 'v3', function() {
          var today = new Date(),
              request;
  
          request = gapi.client.calendar.calendarList.get({
              calendarId: 'pt_br.brazilian#holiday@group.v.calendar.google.com',
              timeMin: (new Date(today.getFullYear(), today.getMonth(), today.getDay(), 0, 0, 0, 0)).toISOString(),
              timeMax: (new Date(today.getFullYear(), today.getMonth(), today.getDay(), 23, 59, 59, 999)).toISOString(),
              fields: 'items(creator(displayName,email),end,endTimeUnspecified,start,summary)'
          });
  
          request.execute(function(response) {
              window.alert('length of items: ' + response.items.length);
          });
  
      });
  }
  </code></pre>
  
  <p>However, I keep getting the following response, which is a 401 (unauthorized) error:</p>
  
  <pre><code>{
   "error": {
    "errors": [
     {
      "domain": "global",
      "reason": "required",
      "message": "Login Required",
      "locationType": "header",
      "location": "Authorization"
     }
    ],
    "code": 401,
    "message": "Login Required"
   }
  }
  </code></pre>
  
  <p>Can someone clarify whether what I'm trying to do is achievable or not?<br>
  And finally if it is possible - what do I have to change referring to my current code?</p>