Cannot create location sync asset set using the official guide

70 views
Skip to first unread message

Gercek Ilke Gultekin

unread,
Feb 15, 2024, 10:39:21 AM2/15/24
to Google Ads API and AdWords API Forum

Hello,

When I try to create a location sync asset set, I get the following error,
ErrorCode: “{{ “fieldError”: “VALUE_MUST_BE_UNSET” }}’
Location: {{ “fieldPathElements”: [ { “fieldName”: “operations”, “index”: 0 }, { “fieldName”: “create” }, { “fieldName”: “location_set” } ] }}

Your guide clearly states that the location set field on the AssetSet entity needs to be set. (https://developers.google.com/google-ads/api/docs/assets/location-assets#create-location-sync)

Can you give me some guidance? Here's my code.

BusinessProfileLocationSet businessProfileLocationSet = new BusinessProfileLocationSet { HttpAuthorizationToken = await GetBusinessProfileAccessToken(), EmailAddress = BusinessProfileEmailAddress, BusinessAccountId = BusinessAccountId, }; businessProfileLocationSet.LabelFilters.Add("SomeLabelFilter"); AssetSet assetSet = new AssetSet { Type = AssetSetType.LocationSync, LocationSet = new LocationSet { LocationOwnershipType = LocationOwnershipType.Affiliate, BusinessProfileLocationSet = businessProfileLocationSet }, Name = "LocationAsset", }; GoogleAdsClient client = Authenticator.CreateGoogleAdsClientForTestAccount(); AssetSetServiceClient assetSetService = client.GetService(Services.V15.AssetSetService); MutateAssetSetsResponse mutateAssetSetsResponse = await assetSetService.MutateAssetSetsAsync(CustomerId.ToString(), new AssetSetOperation[] { new() { Create = assetSet } });

Google Ads API Forum Advisor

unread,
Feb 15, 2024, 6:46:00 PM2/15/24
to gigul...@spotzer.com, adwor...@googlegroups.com
Hi,

Thank you for reaching out to the Google Ads API support team.

By reviewing your concern, I understand that you are getting a "VALUE_MUST_BE_UNSET" error while creating the location sync asset set. This means that the field cannot be set. 

I would like to inform you that the information you have provided is not sufficient to investigate the issue. In order to investigate further, kindly provide us with the complete API logs (request and response with request-id and request header) generated at your end to better assist you on this request. 

If you are using a client library and haven't enabled the logging yet, I would request you to enable logging for the specific client library that you are using. You can refer to the guides Java, .Net, PHP, Python, Ruby or Perl to enable logging at your end. For REST interface requests, you can enable logging via the curl command by using the -i flag.

You can send the details via Reply privately to the author option, or direct private reply to this email.
 
This message is in relation to case "ref:!00D1U01174p.!5004Q02rz9HK:ref"

Thanks,
 
Google Logo Google Ads API Team


Reply all
Reply to author
Forward
0 new messages