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

Update location through V3 API with C# library

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

I was using v2 library to update location but suddenly it was not working from last one month.

So, I decided to use V3 library but here is no UpdateLocationRequest class which i was using for updating location.

 

Below is my code

---------------------------------------------------------------------------------------------------------

Location location= ;

 

locationUpdateRequest.Location = l;

locationUpdateRequest.LanguageCode = "en-GB";
locationUpdateRequest.FieldMask = "location.photos"; 
locationUpdateRequest.ValidateOnly = false;

 

Location location = service.Accounts.Locations.Patch(l, l.Name).Execute(); 

-------------------------------------------------------------------------------------------------------------------------

could you please share me some piece of code for updating location in v3?.

 

 

Thanks.

1 Expert replyverified_user

Re: Update location through V3 API with C# library

Google Employee
# 2
Google Employee

Hi @ICE P,

 

We suggest you please checkout this solution for the code snippet for updating your location with v3 version of the C# client library.

 

Please note, since the C# client library doesn’t currently support the display of detailed error messages, so I suggest you follow the Make a simple HTTP request step-by-step guide on the Google Developers site and try use the OAuth 2.0 Playground to step through the auth flow, and examine the HTTP request/response at each step. This usually helps pinpoint where an application is passing the incorrect info.

 

Hope this helps!

 

Thanks,

The Google My Business API team

Update location through V3 API with C# library

Visitor ✭ ✭ ✭
# 3
Visitor ✭ ✭ ✭
Getting below error while using playground

Unknown name \"e_tag\" at 'location.photos': Cannot find field.\nInvalid JSON payload received

Re: Update location through V3 API with C# library

Google Employee
# 4
Google Employee

Hi @ICE P,

 

As per the Change Log for the v3 of Google My Business API, fieldMask should no longer include the location. prefix for included fields. Please try to make these changes in your code to see if it fixes your issue.

 

Thanks,

Shalini