'Google MBA Service Account get all locations

My company owns several (verified) facilities and using my company's email i can see those locations (business.google.com). enter image description here

Now, my company would like to fetch the reviews in each location and present it in our company website. Before we're using the Google Place API but since it only returns the latest 5 reviews we opt to using Google My Business API to retrieve a location's complete reviews. We'd like our backend (PHP) to retrieve the reviews so using the same email I created a service account (console.developers.google.com/apis/credentials) because we don't need the end user to allow/interact anything when browsing our website. enter image description here

Using postman (with my signed JWT) I have managed to get a valid access token enter image description here

...that I use to retrieve the lists of accounts (mybusinessaccountmanagement.googleapis.com/v1/accounts) I could see the service account itself alone in the response.enter image description here

Now, I tried calling the account locations api (mybusiness.googleapis.com/v4/accounts/{MY_ACCOUNT_ID_HERE}/locations) but it only returns and empty object response.

enter image description here

Can someone help me resolve this issue. Why my service account can't see the verified locations under my company's email. Is this even possible? Thank you.



Solution 1:[1]

Even that this is an older question - I run into the same issue calling the new Google My Business Information v1 API (getting empty results) using a service account.

It seems, that this is not possible or at least not recommended, I found this support article on Google: https://support.google.com/business/thread/8281160/cannot-get-access-to-gmb-locations-with-service-account-with-nodejs?hl=en

The recommendation is to use OAuth.

Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source
Solution 1 Christoph Bachmann