I need all google reviews for particular location but I am unable to use business api from google. Here is url for get request
Now my question is what is the value for param account_name and location_name How can I get that.
Please answer with sample location example
I need all google reviews for particular location but I am unable to use business api from google. Here is url for get request
https://mybusiness.googleapis.com/v3/accounts/account_name/locations/location_name/reviews
Now my question is what is the value for param account_name and location_name How can I get that.
Please answer with sample location example
Share Improve this question asked Dec 8, 2016 at 7:44 Bhavesh NariyaBhavesh Nariya 3652 gold badges7 silver badges25 bronze badges 1 |2 Answers
Reset to default 9I think first of all you need to white list your google my business api for whatever project you are working on in your project as its private api. Google my business api will work on the locations associated with your account so make sure you verified the LOCATIONS from any account you know. Then you can try out the api call you mentioned in OAuthplayground.
- Follow steps mentioned in below documentation URL to set it up: https://developers.google.com/my-business/content/prereqs
After the setup and etc you will automatically understand the account id and location id.
Also few more urls you can go to understand it better.
- https://console.developers.google.com (here you will setup your project)
- https://business.google.com/manage (here you will add/can see the locations - for which you need reviews)
- https://developers.google.com/my-business/content/basic-setup (Steps after completing the prereq)
- https://developers.google.com/oauthplayground (You will test the my business api here after approval)
When you make a request to https://mybusiness.googleapis.com/v3/accounts
it gives you a list of accounts. On those accounts they have a field called name. That field is accounts/account_name.
{
"state": {
"status": "UNVERIFIED"
},
"type": "PERSONAL",
"name": "accounts/1337",
"accountName": "example"
}
When you make a request to https://mybusiness.googleapis.com/v3/accounts/account_name/locations
it gives you a list of locations. On those locations they have a field called name. That field is accounts/account_name/locations/location_name.
{
"locations": [
{
"languageCode": "en",
"openInfo": {
"status": "OPEN",
"canReopen": true
},
"name": "accounts/1337/locations/13161337",
...
}
Google identifier for this location in the form: accounts/{account_id}/locations/{location_id}
– Ethan Commented Dec 8, 2016 at 8:34