GMB API - Working with PubSub to get real time reviews notification
Asked Answered
S

2

6

I have integrated GMB API in our platform and working with PubSub to get realtime reviews notification.
For which i have already done the following steps:

  1. Created topic on google PubSub cloud.
  2. Created its subscription of push type with a valid https url.
  3. Updated Google Business Account Notification with the topic created in step one with all kind of notification type.

Problem:

  1. After successfully completing the 3 steps above, Google is still not pushing the reviews data to my server when I go to My Business API and edit the review.
  2. Can I create a single topic for all users and use a single subscription of application, so when users authorize their My Business API with our platform we just have to link those businesses with that single topic to get their notification?

This is what i get from google's documentation.
Any respond is highly appreciated.

Thank you :)

Silken answered 1/2, 2018 at 17:20 Comment(2)
I am doing the same thing in .NET, I am using the .NET Official library provided by Google, but I am unable to "Updated Google Business Account Notification". I am constantly getting this error: "Parameter validation failed for \"name\"" Please let me know if you have faced this issue. Thanks!Doralyn
I am having some doubts while implementing this. - Created its subscription of push type with valid https url. What is this https url? - PUT mybusiness.googleapis.com/v4{name=accounts/*/notifications} What should be this value? PUT mybusiness.googleapis.com/v4/account-id/notifications?Horny
S
3

Did you give Publish rights to the [email protected] email address. Since it works for me with the above steps. Though the messages are bit delayed.

Selfconsistent answered 20/6, 2018 at 14:46 Comment(5)
Yup, i solved the issue by giving publish rights to [email protected].Silken
It would be extremely useful if you could add example payload for notifications as I am not able to find those documented anywhere.Therefor
@DanyalMalik I'm having the same issue but I have given those rights. How delayed are the messages? Sometimes hours?Tolerant
the best way to get a sample of the payload is to log the request body in your webhook action, something like this: Stream req = Request.Body; string json = await new StreamReader(req).ReadToEndAsync();Norven
Thank you. In my case, I was thinking that Pub/Sub Admin permissions inherit publish permission but that wasn't the case. It should be Pub/Sub Publish.Magus
G
0

In my situation, when I attempted to use the update notification API, I encountered a 400 error displaying the message "PUBLISH_PERMISSIONS_MISSING_FOR_PUBSUB_TOPIC." This issue arose when I included pubsub_topic and notificationTypes within the update_mask key. To resolve this, I modified the permissions settings of my Pub/Sub topic to allow access to all_users, which successfully addressed the problem.

Grumpy answered 2/2, 2024 at 7:4 Comment(0)

© 2022 - 2025 — McMap. All rights reserved.