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:
- Select & authorize APIs: pasting "https://www.googleapis.com/auth/business.manage" in the API field input & clicking "Authorize APIs"
- Letting myself obtain authorization code to obtain access token
- 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:
- What am I missing in order to get review data from place belonging to the account I am accessing to?
- Am I using proper API access or method to reach my desired result?
- Could the problem be really in some IAM permissions? If so, how to set them to reach my goal?