Angular get holidays gapis : This is my function inside service

    getHolidays() {
        let api = 'https://www.googleapis.com/calendar/v3/calendars/tn%40holiday.calendar.google.com/events?key=myKey'
        return this.http.get<any>(api, {
          headers : new HttpHeaders().append('Content-type', 'application/json')
        });
      }

it works on browser but give 401 in angular 
why ? 