API to get all the reviews and rating from Google for business
You should need to use the Google My Business API if you want to get all the reviews.
It's another different API, and you should request from Google the property of the place.
Google API get reviews for my business using java script
The redirect uri in your project on Google cloud console must exactly match the redirect uri you are sending from The easiest solution is to go to your project and add it.
Which is not the same as as you have an extra slash on the end
This video will walk you though it. Google OAuth2: How the fix redirect_uri_mismatch error.
Question from Comments
how can I get the reviews using just API key without a need to authorize it using gmail account?
If you check the documentation Method: accounts.locations.reviews.list you will find that it says the following
API keys only allow you to access public data, the data you are trying to access is private user data and therefore requires authorization in order to access it. You can not use an API key to access this data you must be authorized using one of the above scopes. A video which explains api keys. Everything you need to know about Google API Key's, and where to get one.
How to get all the reviews within the date range in Google My Business Api?
Sorry, but Google doesn't documented the "timeRange" as a query parameter option.
The only options are
I want to get both Google reviews (comments) and star rating. How can I get them?
Google My Business API has these feature.
To list review, you have two options that is to specify or list all. Here's an HTTP sample that you can use with cURL or Postman:
List all reviews:
Get a specific review:
Here's an overview for star rating.
If you want wish to implement this API on your application, you may refer to the samples on how to use the client library.