Search code examples
google-cloud-platformgoogle-my-business-apigoogle-my-business

List all locations from a single account in Google my business API


My requirement is I'm trying to get all the reviews from all the locations of an account. So first I'm trying to list all the locations in an account using: https://mybusinessbusinessinformation.googleapis.com/v1/{parent=accounts/****}/locations

I'm using Google Oauth2 Playground to replicate this scenario but getting 404 not found error.

enter image description here

However I can list all the accounts using: https://mybusinessaccountmanagement.googleapis.com/v1/accounts this gives me all the accounts.

But how to get all the locations from a single account?


Solution

  • The query parameter readMask is required, the request should look like:

    https://mybusinessbusinessinformation.googleapis.com/v1/accounts/117163.......7290...757/locations?readMask=name