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

Photo Upload Field 400 Error

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

Dear Google Team, 

 

we are receiving an error. We tried to upload photos and it appears we get an invalid json payload error.

 

{
 "error": {
  "status": "INVALID_ARGUMENT",
  "details": [
   {
    "@type": "type.googleapis.com/google.rpc.BadRequest",
    "fieldViolations": [
     {
      "description": "Invalid JSON payload received. Unknown name \"location\" at 'location': Cannot find field.",
      "field": "location"
     },
     {
      "description": "Invalid JSON payload received. Unknown name \"field_mask\" at 'location': Cannot find field.",
      "field": "location"
     }
    ]
   }
  ],
  "code": 400,
  "message": "Invalid JSON payload received. Unknown name \"location\" at 'location': Cannot find field.\nInvalid JSON payload received. Unknown name \"field_mask\" at 'location': Cannot find field."
 }
}

We are using python and the requests lib.

json.dumps sends:

{"location": {"photos": {"additionalPhotoUrls": ["https://www.bspotted.net/media/mhuber%40bspotted.net/rich_features_1_lNhWzy0.png", "https://www.bspotted.net/media/mhuber%40bspotted.net/helmet_SauuCcA.jpg"]}}, "fieldMask": "location.photos.additionalPhotoUrls", "language_code": "de_AT"}

How can we fix this ?

 

Cheers Daniel

1 Expert replyverified_user

Photo Upload Field 400 Error

Visitor ✭ ✭ ✭
# 2
Visitor ✭ ✭ ✭

Fixed it, v3 has no more location prefix.

Re: Photo Upload Field 400 Error

Google Employee
# 3
Google Employee

Hi @Daniel K,

 

Glad to know that your issue got resolved. As per the Change Log for the v3 of Google My Business API, Field masks of location object should no longer include the location. prefix for included fields.

 

Please feel free to contact us for any Google My Business API related questions.

 

Thanks,

Shalini, GMB API Team