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

validateOnly param not working as expected

[ Edited ]
Follower ✭ ☆ ☆
# 1
Follower ✭ ☆ ☆

Hi,

 

I'm sending a request to GMB API with the param validateOnly=true to check if a given address is valid. The problem is that the API is responding with a success response when using the validateOnly param but is returning an error when the validateOnly param is removed.

 

Example attached for the same request using/not using the validateOnly param:

gmb-does-not-accepts-strange-accepts-when-validate-only-is-disabled.pnggmb-accepts-strange-addresses-in-validate-only-mode.png

 

 

 

1 Expert replyverified_user

Re: validateOnly param not working as expected

Google Employee
# 2
Google Employee

Hi @David R,

 

It is always recommended to add query parameters when you patch a location via the Google My Business API. If you set the validateOnly boolean field to true when sending a PATCH request to update a specified location via the Google My Business API, the request is validated without actually updating the location.

 

Please note that, whenever you update a specified location you should always set the validateOnly boolean field to false. Please checkout the given Request URI:

 

PATCH https://mybusiness.googleapis.com/v3/accounts/account_name/locations/locationId?languageCode=en&validateOnly=false&fieldMask=address

 

Thanks,

The Google My Business API team

Re: validateOnly param not working as expected

Follower ✭ ☆ ☆
# 3
Follower ✭ ☆ ☆

It does not work, the response is exactly the same:

 Screen Shot 2017-05-08 at 20.09.22.png