The case:

I want to get all Google My Business API place reviews using OAuth2 for internal project. I am using OAuth2 Playground for testing purposes while I am not able to get proper permission in these steps:

  1. Select & authorize APIs: pasting "https://www.googleapis.com/auth/business.manage" in the API field input & clicking "Authorize APIs"
  2. Letting myself obtain authorization code to obtain access token
  3. Using method GET, without additional headers I am able to obtain basic data about the project, but not from the particular place. I am able to list accounts.

Even in my project I was able to implement this: https://developers.google.com/my-business/content/implement-oauth. While I was able to use in OAuth2 Playground this: https://developers.google.com/my-business/content/account-data. But I need to use this: https://developers.google.com/my-business/content/review-data.

The error message in response:

      {
  "error": {
    "status": "PERMISSION_DENIED", 
    "message": "Google My Business API has not been used in project PROJECTCODE before or it is disabled. Enable it by visiting https://console.developers.google.com/apis/api/mybusiness.googleapis.com/overview?project=PROJECTCODE then retry. If you enabled this API recently, wait a few minutes for the action to propagate to our systems and retry.", 
    "code": 403, 
    "details": [
      {
        "@type": "type.googleapis.com/google.rpc.Help", 
        "links": [
          {
            "url": "https://console.developers.google.com/apis/api/mybusiness.googleapis.com/overview?project=PROJECTCODE", 
            "description": "Google developers console API activation"
          }
        ]
      }, 
      {
        "reason": "SERVICE_DISABLED", 
        "@type": "type.googleapis.com/google.rpc.ErrorInfo", 
        "domain": "googleapis.com", 
        "metadata": {
          "consumer": "projects/PROJECTCODE", 
          "service": "mybusiness.googleapis.com"
        }
      }
    ]
  }
}

After I access the project info from the link from response It will show error :"You do not have sufficient permissions to view this page" and this:

You are missing the following required permissions: Project resourcemanager.projects.get serviceusage.services.get

and links to the IAM docs which I find very confusing.

Questions:

  1. What am I missing in order to get review data from place belonging to the account I am accessing to?
  2. Am I using proper API access or method to reach my desired result?
  3. Could the problem be really in some IAM permissions? If so, how to set them to reach my goal?
2

There are 2 best solutions below

3
On

Please check if you have access to the Google My Business API by visiting https://console.cloud.google.com/apis/dashboard

Unlike the My Business Account Management API, the Google My Business API required to retrieve reviews is private.


Edit: the overview page is not the issue, I am talking about API access. It should show up in the list of enabled APIs:

Enabled APIs


Edit 2: You are missing the 9th API, the original Google My Business API. Since the documentation (https://developers.google.com/my-business/content/prereqs#request-access) does not mention how to get access to the old API, I would try contacting the API support if they still give out access to it: https://support.google.com/business/contact/api_default

3
On

in the message you received there is a link in url object

"links": [ { "url": "https://console.developers.google.com/apis/api/mybusiness.googleapis.com/overview?project=PROJECTCODE", "description": "Google developers console API activation" }

copy that link, open it in the browser, and probably you need to sign into you account and then Enable the APi. Then you should be able to run your code or see what you want in playground