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

Why is phone number required for creating a location using API?

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

Hi,

 

Why is phone number a required a field when creating a location using GMB API, but it's not required when creating a location using the GMB UI? We are helping merchants using GMB to manage location extensions for running advertisements on AdWords. Some of our merchants do not want their phone numbers to be listed. Through the GMB UI, they can do so by not specifying their phone numbers, but it's not possible to do that using the API.

 

Please advise.

Kevin

1 Expert replyverified_user

Re: Why is phone number required for creating a location using API?

Google Employee
# 2
Google Employee

Hi @Kevin N,

 

The phone number is an optional field when creating a new location using the Google My Business API. If you do not want your phone numbers to be listed, you can leave primaryPhone field blank during location creation.

 

Thanks,

Shalini, The Google My Business API team

Why is phone number required for creating a location using API?

Visitor ✭ ✭ ✭
# 3
Visitor ✭ ✭ ✭

Hi Shalini,

 

We tried and got this error:

 

Response Object:
{"error": {
  "code": 400,
  "details": [{"errorDetails": [{
    "code": 2,
    "field": "primary_phone",
    "message": "primary_phone is required"
  }]}],
  "message": "Request contains an invalid argument.",
  "status": "INVALID_ARGUMENT"
}}

Why is phone number required for creating a location using API?

Visitor ✭ ✭ ✭
# 4
Visitor ✭ ✭ ✭

Hi,

Have you had a chance to look into this?

Why is phone number required for creating a location using API?

Visitor ✭ ✭ ✭
# 5
Visitor ✭ ✭ ✭

I can verify the same issue. I am also hoping for an answer here.

 

If I try to create a location with no websiteUrl and no primaryPhone, I get the error "primary_phone is required".

 

Providing a websiteUrl with no primary phone returns 200 OK.

 

Our use case is to provide neither primaryPhone or websiteUrl for some locations.

Re: Why is phone number required for creating a location using API?

Google Employee
# 6
Google Employee

Hi @Kevin N & @Greg M,

 

We are trying to replicate the issue you reported and will follow up soon with a response. Thanks for your patience.

 

Thanks,

Shalini, The Google My Business API team

Why is phone number required for creating a location using API?

Visitor ✭ ✭ ✭
# 7
Visitor ✭ ✭ ✭

Shalini,

 

 

Do you have any updates to share with us on this issue?

Re: Why is phone number required for creating a location using API?

Google Employee
# 8
Google Employee

Hi @Kevin N,

 

In the Google My Business API and spreadsheet, one of websiteUrl or primaryPhone is required for creating a new location. So please make sure you included at least any one of information when creating a new location using the Google My Business API.

 

Thanks,

The Google My Business API team

Why is phone number required for creating a location using API?

Visitor ✭ ✭ ✭
# 9
Visitor ✭ ✭ ✭

Hi Shalini,

 

 

How does website URL get used?