const adGroupService = adwordsServices.getService('AdGroupCriterionService', 'v201710');
const operation = {
operator: 'ADD',
operand: {
adGroupId: adGroupId,
'xsi:type': 'AdGroupCriterion',
criterion: {
'xsi:type': 'CriterionUserInterest',
id: '80675'
}
}
};
return adGroupService.mutate({operations: [operation]}, (error, result) => ...
I was wondering if you can help me with this.
Thank you in advance,
Nima
<?xml version="1.0" encoding="utf-8"?><soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:tns="https://adwords.google.com/api/adwords/cm/v201710" xmlns:jaxb="http://java.sun.com/xml/ns/jaxb">
<soap:Header>
<ns1:RequestHeader xmlns:ns1="https://adwords.google.com/api/adwords/cm/v201710" xmlns="https://adwords.google.com/api/adwords/cm/v201710">
<ns1:developerToken>xxxxx</ns1:developerToken>
<ns1:userAgent>xxxxx</ns1:userAgent>
<ns1:validateOnly>false</ns1:validateOnly>
<ns1:clientCustomerId>xxx-xxx-xxxx</ns1:clientCustomerId>
</ns1:RequestHeader>
</soap:Header>
<soap:Body>
<mutate xmlns="https://adwords.google.com/api/adwords/cm/v201710">
<operations>
<operator>ADD</operator>
<operand xsi:type="AdGroupCriterion">
<adGroupId>xxxxxxxx</adGroupId>
<criterion xsi:type="CriterionUserInterest">
<id>80675</id>
</criterion>
</operand>
</operations>
</mutate>
</soap:Body>
</soap:Envelope>
Error:
<soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/">
<soap:Header>
<ResponseHeader xmlns="https://adwords.google.com/api/adwords/cm/v201710">
<requestId>000562f9926f88780a017e03a0048c41</requestId>
<serviceName>AdGroupCriterionService</serviceName>
<methodName>mutate</methodName>
<operations>1</operations>
<responseTime>597</responseTime>
</ResponseHeader>
</soap:Header>
<soap:Body>
<soap:Fault>
<faultcode>soap:Server</faultcode>
<faultstring>[InternalApiError.UNEXPECTED_INTERNAL_API_ERROR @ com.google.ads.api.services.common.error.InternalApiError.<init>(InternalApiErro]</faultstring>
<detail>
<ApiExceptionFault xmlns="https://adwords.google.com/api/adwords/cm/v201710">
<message>
[InternalApiError.UNEXPECTED_INTERNAL_API_ERROR @ com.google.ads.api.services.common.error.InternalApiError.<init>(InternalApiErro]</message>
<ApplicationException.Type>ApiException</ApplicationException.Type>
<errors xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:type="InternalApiError">
<fieldPath>
</fieldPath>
<trigger></trigger>
<errorString>InternalApiError.UNEXPECTED_INTERNAL_API_ERROR</errorString><ApiError.Type>InternalApiError</ApiError.Type><reason>UNEXPECTED_INTERNAL_API_ERROR</reason>
</errors>
</ApiExceptionFault>
</detail>
</soap:Fault>
</soap:Body>
</soap:Envelope>
Thanks,
Nima