Reputation: 495
When locally trying to use Google books api to get public data:
Request had invalid authentication credentials. Expected OAuth 2 access token, login cookie or other valid authentication credential. See https://developers.google.com/identity/sign-in/web/devconsole-project."
API_URL = "https://www.googleapis.com/books/v1/volumes";
this.http
.get<GoogleBooksApiInterface>(`${this.API_URL}?q=${title}`)
Even after adding &key=api_key
, the response is the same.
Upvotes: 1
Views: 135
Reputation: 495
After spent some time to figure it out and found solution (which is not unfortunately mentioned in google documentation): to make it works in my case I use NodeJS on the backend side and moved there this API request.
Angular => NodeJS => API call => Angular
Upvotes: 1