We are trying to set up a functionallity to our API for fetching reviews from a google location. Most of the APIs are working, meaning that an OAuth2 client has been set up corecctly.
Now, we are trying to setup a pub/sub notification to receive a push notification on my webhook endpoint at our API. Having searched endless hours I still cannot understand why I would get a 403 error, more specifically
{
"error": {
"status": "PERMISSION_DENIED",
"message": "The caller does not have permission",
"code": 403
}
}
As I am more than certain all of the configuration has been done as per the documentaion’s instructions, my last option (last actual is to ask google but not expecting to ever get an answer) is to ask you guys for help.
Already having gained access to the MyBusiness API and enabled the API (mybusinessnotifications.googleapis.com/v1) I followed the steps in the documentation:
- Application has been configured
- Created a pub/sub topic
- Gave the
[email protected]
thepubsub.topics.publish
permision. To make sure, I even tried it with the admin permisions as can be seen in the bellow images:
At the pub/sub level:pub/sub permisions
At the project level:project permisions - Created the subscription (although not really relevant at this issue)
- Performed a request on
PATCH https://mybusinessnotifications.googleapis.com/v1/accounts/-/notificationSetting?updateMask=notificationSetting
and received the response:
{
"error": {
"status": "PERMISSION_DENIED",
"message": "The caller does not have permission",
"code": 403
}
}
To make sure I am doing everything correct, I have moved ahead and tried the same request at Google’s OAuth 2.0 playground receiving the exact same response, ruling out any issues with my codebase.
The body I am sending with each PATCH request is this:
"pubsubTopic":"projects/PROJECTNAME/topics/new-review"
Although, I have also tried calling the endpoint, by providing also the name
and the notificationTypes
attributes.
Google’s documentations are way outdated and I have ran out of options and ideas to try out.
Thank you all so much in advance.
Nikolaos Ktistakis is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.