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

Location Create 500 error when include Photos

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

When i attempt to create a location i get this error:

 

{
 
"error": {
   
"status": "INTERNAL",
   
"message": "Internal error encountered.",
   
"code": 500
 
}
}

 

Create location

 

https://mybusiness.googleapis.com/v3/accounts/< my account #>/locations?languageCode=en-us&validateOnly=false&requestId=1323323

 

My POST data  is:

 

 

{"adWordsLocationExtensions":null,"additionalCategories":null,"additionalPhones":null,"address":{"addressLines":["4900 Mueller Blvd"],"administrativeArea":"TX","country":"US","locality":"Austin","postalCode":"78723","subLocality":null },"attributes":null,"labels":null,"languageCode":null,"latlng":null,"locationKey":null,"locationName":"Valliammai R. Annamalai-Slavis,  MD","locationState":null,"metadata":null,"name":null,"openInfo":null,"photos":{"additionalPhotoUrls":null,"commonAreasPhotoUrls":null,"coverPhotoUrl":null,"exteriorPhotoUrls":null,"foodAndDrinkPhotoUrls":null,"interiorPhotoUrls":null,"logoPhotoUrl":null,"menuPhotoUrls":null,"photosAtWorkUrls":null,"preferredPhoto":null,"productPhotoUrls":null,"profilePhotoUrl":"https://www.seton.net/images/profiles/Hoang-Lan-250.jpg","roomsPhotoUrls":null,"teamPhotoUrls":null },"primaryCategory":{"categoryId":"gcid:pediatrician","name":"Pediatrician" },"primaryPhone":"5123240000","regularHours":{"periods":[] },"serviceArea":null,"specialHours":null,"storeCode":"54","websiteUrl":"http://www.dellchildrens.net/for_healthcare_professionals/pediatric_consultation_and_referral_servic..." }

FAILS

 

BUT if i post:

 

{"adWordsLocationExtensions":null,"additionalCategories":null,"additionalPhones":null,"address":{"addressLines":["4900 Mueller Blvd"],"administrativeArea":"TX","country":"US","locality":"Austin","postalCode":"78723","subLocality":null },"attributes":null,"labels":null,"languageCode":null,"latlng":null,"locationKey":null,"locationName":"Valliammai R. Annamalai-Slavis,  MD","locationState":null,"metadata":null,"name":null,"openInfo":null,"photos":{"additionalPhotoUrls":null,"commonAreasPhotoUrls":null,"coverPhotoUrl":null,"exteriorPhotoUrls":null,"foodAndDrinkPhotoUrls":null,"interiorPhotoUrls":null,"logoPhotoUrl":null,"menuPhotoUrls":null,"photosAtWorkUrls":null,"preferredPhoto":null,"productPhotoUrls":null,"profilePhotoUrl":null,"roomsPhotoUrls":null,"teamPhotoUrls":null },"primaryCategory":{"categoryId":"gcid:pediatrician","name":"Pediatrician" },"primaryPhone":"5123240000","regularHours":{"periods":[] },"serviceArea":null,"specialHours":null,"storeCode":"54","websiteUrl":"http://www.dellchildrens.net/for_healthcare_professionals/pediatric_consultation_and_referral_servic..." }

 

This succeeds and returns 200 -OK

 

Is there some issue using API with photos?

 

1 Expert replyverified_user

Location Create 500 error when include Photos

Explorer ✭ ✭ ☆
# 2
Explorer ✭ ✭ ☆

Hi @Seton L,

 

I get the same error when creating new locations. This isn't specific to the API though - if you've used the bulk import tool, Google has to verify and publish the listing before you can add images. The bulk import tool still publishes new location details and just ignores images while the API returns an error and fails to create the location altogether.

 

The temporary solution is to remove images from new locations when publishing these via API. Hopefully the API team can create the same response as bulk import - publish new location details and ignore images instead of returning a 500 error on the entire location.

Location Create 500 error when include Photos

[ Edited ]
Visitor ✭ ✭ ✭
# 3
Visitor ✭ ✭ ✭

Thanks for the info that explains a lot , Is that documented somewhere you know about? 

Re: Location Create 500 error when include Photos

Google Employee
# 4
Google Employee

Hi @Seton L,

 

Please make sure that the location you are uploading the photos to has an associated Google+ page, as indicated by a plusPageId in the LocationKey, since photos are supported only with a Google+ page, and the photos meet the specifications of the Photos object documented on our Google Developers site.

 

Thanks,

The Google My Business API team

Location Create 500 error when include Photos

Visitor ✭ ✭ ✭
# 5
Visitor ✭ ✭ ✭

@Shalini S

 

Thanks , so you are saying it is or is not true that you cant add photos on a location create? IF the plusPageId is the issue the API doesnt seem to indicate that just give a 500 error, is there way to get more detailed information?

 

 My question> If a location is new and we have to have a google plus page associated , does that mean we need to manually create a Goolge+page , get the plusPageId somehow then send that along with our API create request so we can have images?

 

 

Location Create 500 error when include Photos

Visitor ✭ ✭ ✭
# 6
Visitor ✭ ✭ ✭

Shalini S

 

Just curious if you saw my question:

 

Do i need to just create a google plus page  manually and find ID then use that to create locatin wit images? or can i use GMB API to create google plus page so i can have the ID? thnks

Location Create 500 error when include Photos

Visitor ✭ ✭ ✭
# 7
Visitor ✭ ✭ ✭

@Shalini S

 

Just curious if you saw my question:

 

Do i need to just create a google plus page  manually and find ID then use that to create locatin wit images? or can i use GMB API to create google plus page so i can have the ID? thnks

Location Create 500 error when include Photos

Visitor ✭ ✭ ✭
# 8
Visitor ✭ ✭ ✭

@Shalini S

 

Can you provide any assistance on how to associate a G+ page to a GMB location i create via GMB api? 

Location Create 500 error when include Photos

Visitor ✭ ✭ ✭
# 9
Visitor ✭ ✭ ✭

 

 @Shalini S

Does creation of a location via the API automatically create a Google+ page for the business?
Locations created through the API under bulk verified GMB accounts will generate a Google+ page. To generate a Google+ page for an unverified location, you can verify the location manually through the GMB user interface. Learn more
 
 
So when i created a location via API it did not generate a Googe Plus page ID but i do have a bulk verified account so I dont understand how to make this work.

Re: Location Create 500 error when include Photos

Google Employee
# 10
Google Employee

Hi @Seton L,

 

No, Google+ page cannot be created through the Google My Business API. To create a new Google+ page, simply log into Google+ with the same credentials you use to manage your GMB Listing.  A new welcome screen will guide you through the process of creating a Google+ Page for your business.

 

Please do let me know if you have any questions!

 

Thanks,

The Google My Business API team