2

I'm trying to use this API to get all Google business reviews

https://mybusiness.googleapis.com/v4/accounts/{accountId}/locations/{locationId}/reviews

But here I need accountId and locationId. I want to make use of api to get both these values.

I was able to find accountid using the API but can't figure out how to get locationId.

This was suggested by few posts but this is not working.

mybusiness.googleapis.com/v4/accounts{accountId}/locations

Could someone help me get locationId using api?

Arsene Wenger
  • 587
  • 4
  • 21

2 Answers2

1

According to the official doc, you can retrieve the list of accounts by doing the following http request:

GET https://mybusinessaccountmanagement.googleapis.com/v1/accounts

This should give you all the accounts related to your parent account.

Similarly, you can get all the locations from a given account (doc here) in this way:

GET https://mybusinessbusinessinformation.googleapis.com/v1/{parent=accounts/*}/locations

The request you posted is deprecated (see here) as Google is moving from the v4.9 version to more granularly services (info here).

Sprizgola
  • 416
  • 2
  • 10
0

The API you are using seem to be expired. Have a look at this link My Business Account Management API for reading all your Accounts and Account IDs

The HTTP request for reading accounts:

GET https://mybusinessaccountmanagement.googleapis.com/v1/accounts

, and this link My Business Business Information API to have the list of Locations.

The HTTP request for locations:

GET https://mybusinessbusinessinformation.googleapis.com/v1/{parent=accounts/*}/locations

In addition, you might be interested in reading the answer provided for this question

Shila Mosammami
  • 999
  • 6
  • 20