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 :)

Rodrigo C.
  • 1,114
  • 7
  • 13
Danyal Malik
  • 198
  • 11
  • 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! – Mudassar Saleem Sep 17 '18 at 06:53
  • I am having some doubts while implementing this. - Created its subscription of push type with valid https url. What is this https url? - PUT https://mybusiness.googleapis.com/v4/{name=accounts/*/notifications} What should be this value? PUT https://mybusiness.googleapis.com/v4/account-id/notifications? – Ayush Chauhan Nov 29 '18 at 13:15

1 Answers1

3

Did you give Publish rights to the mybusiness-api-pubsub@system.gserviceaccount.com email address. Since it works for me with the above steps. Though the messages are bit delayed.

bhuvin
  • 1,382
  • 1
  • 11
  • 28
  • Yup, i solved the issue by giving publish rights to mybusiness-api-pubsub@system.gserviceaccount.com. – Danyal Malik Jun 22 '18 at 07:59
  • 2
    It would be extremely useful if you could add example payload for notifications as I am not able to find those documented anywhere. – mahoriR Aug 27 '19 at 13:44
  • @DanyalMalik I'm having the same issue but I have given those rights. How delayed are the messages? Sometimes hours? – green reign Feb 12 '20 at 23:44
  • 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();` – Mahmoud Farahat Jan 19 '21 at 12:28
  • 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`. – Alexandru Burca Mar 11 '21 at 18:30