My Business
2.1K members online now
2.1K members online now
For developers who are using the Google My Business API to manage locations
Guide Me
star_border
Reply

Get an update notification when account status change

[ Edited ]
Visitor ✭ ✭ ✭
# 1
Visitor ✭ ✭ ✭

We have created topic name and subscription. We have given permissions to topic name. But when we call "Getnotification" method of account. Please see below Result.

 

TopicName.png                         

 We get topic name is null .

and when  we call account.updatenotification method.  We get below error .

 

"Google.Apis.Requests.RequestError

Request contains an invalid argument. [400]

Errors [

Message[Request contains an invalid argument.] Location[ - ] Reason[badRequest] Domain[global]

]"

 

 So,

How we get notification when account status change in api by calling Google My Business api.

please provide steps for get and update notification when account status change on google my business.

Spoiler
 

 

 

1 Expert replyverified_user

Re: Get an update notification when account status change

Google Employee
# 2
Google Employee

Hi @Scout50 D,

 

Please navigate to the Pub/Sub topics page in the Cloud Platform Console to make sure that you have Created a topic, Given it publish permissions, Created a subscription and Specified push or pull delivery flow. Please note that you can perform these aforementioned operations not only through sending requests, but also manually through the Cloud Platform Console UI.

 

According to the Publisher Guide, a topic you create is supposed to be in this format:

projects/myproject/topics/mytopic

 

Please note that the “myproject” placeholder for the topic shown above should be the Project ID of your whitelisted project. Please use the correct format shown above for the topicName field of the Notifications object when sending the PUT request for updating the Google Cloud Pub/Sub notification settings for the specified account. Please note that the URI of this PUT request including the account_name of the specified account should be in this format:

https://mybusiness.googleapis.com/v3/accounts/account_name/notifications

 

You can also follow the Make a simple HTTP request step-by-step guide on the Google Developers site to learn how to use the OAuth 2.0 Playground for troubleshooting errors with detailed error messages when sending requests with data via the Google My Business API.

 

Thanks,

Shalini