Is it possible to grant a service account the necessary permissions to access the Google Business Profile API for reading reviews? Or does this API require access through a primary user account, with the service account needing delegated access to that user account?
I’ve read conflicting information suggesting that service accounts might not have direct access and that a human user’s main account might be needed.
Other steps to access the GBP API include: Getting a Google Account, Trying out Business Profile, Creating a project in the Google API Console, and Requesting access to the API.
You can review the deprecation schedule and instructions to migrate from the v4 reportInsights API method to the Google Business Profile Performance API.
Thank you for your initial guidance. I’ve already created a service account and have the necessary permissions to assign roles to it. However, I’m still uncertain about which specific IAM role or configuration is required for the service account to access locations in the Google Business Profile API and retrieve reviews for these locations.
Current Setup:
I created the service account and assigned the roles/resourcemanager.projectIamAdmin role as suggested. However, I’m not entirely sure why this specific role is recommended, as I expected there might be a dedicated Google My Business or Google Business Profile role.
Verified that the Google Business Profile feature is activated in the customer’s Google Workspace.
I am able to retrieve a account ID using my code when the service account runs the Google Cloud Function.
The issue: I cannot retrieve the location IDs of the business locations.
My Understanding and Questions:
In Google My Business, users typically have to be added to the business profile under “Users and access” with specific permissions, and they receive an email to accept the invitation. Does this process also apply to service accounts?
How do I ensure that this service account has the necessary access to all relevant business locations?
Is the Resource Manager Project IAM Admin Role sufficient or appropriate for accessing the Google Business Profile API, or is there a more relevant role specifically for Google Business Profile access? If a specific Google My Business/Google Business Profile role exists, what would it be, and how can I assign it to a service account?
I need the service account to have access to the business locations so it can read the reviews for each of these locations. Any insights or detailed steps on how to achieve this would be greatly appreciated!
Apologies if these are basic questions—I’m just trying to fully understand what’s going on here and might be missing something simple.
We are having the same issue, I can assign access to the service account in the business.google.com portal, but it just is stuck at invited since there is no way to accept the invitation.
So a little progress is that once I have the service account setup in the project I need to add the Service Account on the BPM UI by clicking on Group Settings → Manage Users → Add Users as a manager, then use the accounts.invitations.list with the account_id (from accounts.list) to get the invitation. In theory at that point I can use accounts.invitations.accept with the invitation ID to accept the invite and the service account will have access, except I keep getting back “Precondition check failed (failedPrecondition)”. Anyone else have thoughts on this?