I tried the solution given in the above link. I'm using node.js so I tried using the soap kit as suggested in the document. I tried to run the same example mentioned in the link above because if It works for "locationName". It will work for "Id".
async function getLocationName() { let wsdlURL = 'https://adwords.google.com/api/adwords/cm/v201809/LocationCriterionService?wsdl'; const url = 'https://adwords.google.com/api/adwords/cm/v201809'; let Id = "1000004"; let LocationName = "Quebec"; var args = { request: { "feilds":["Id", "LocationName", "CanonicalName", "DisplayType", "ParentLocations", "Reach"], "predicates":["LocationName","IN",LocationName] } }; soap.createClientAsync(wsdlURL).then((client) => { console.log(client); // Returns an object which contains xml script starting as shown below along with other key-values console.log(client.getLocation(args).getLocationName()); //Throws error "client.getLocation is not a function" with or without args return client.MyFunctionAsync(args); }).then((result) => { console.log(result); }) .catch((e)=> { console.log(e) }); } xml: '<?xml version="1.0" encoding="UTF-8"?>\n' + '<!-- Generated file, do not edit -->\n' + '<!-- Copyright 2021 Google Inc. All Rights Reserved -->\n' + '<wsdl:definitions\n' + ' targetNamespace="https://adwords.google.com/api/adwords/cm/v201809"\n' + ' xmlns:tns="https://adwords.google.com/api/adwords/cm/v201809"\n' + ' xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/"\n' + ' xmlns:wsdlsoap="http://schemas.xmlsoap.org/wsdl/soap/" xmlns:xsd="http://www.w3.org/2001/XMLSchema">\n' + ' <wsdl:types>\n' + What am I doing wrong? On Saturday, 10 April 2021 at 00:20:22 UTC+5:30 adsapiforumadvisor wrote: > Hello, > > Please use the GET operation just as shown here > <https://developers.google.com/adwords/api/docs/guides/location-targeting#look_up_location_codes_for_a_region> > > except set a predicate on the Id instead of the LocationName. Let me know > if you still face issues. > > Cheers, > > Anthony > > [image: Google Logo] > Anthony > Google Ads API Team > > > ref:_00D1U1174p._5004Q2FX9bC:ref > -- -- =~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~ Also find us on our blog: https://googleadsdeveloper.blogspot.com/ =~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~ You received this message because you are subscribed to the Google Groups "AdWords API and Google Ads API Forum" group. To post to this group, send email to adwords-api@googlegroups.com To unsubscribe from this group, send email to adwords-api+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/adwords-api?hl=en --- You received this message because you are subscribed to the Google Groups "AdWords API and Google Ads API Forum" group. To unsubscribe from this group and stop receiving emails from it, send an email to adwords-api+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/adwords-api/a7e8289c-4da6-475c-b6ca-83b311340489n%40googlegroups.com.