Negative campaign criterrion ALLOWED_GAMBLING_CONTENT

67 views
Skip to first unread message

MrGapo

unread,
Nov 12, 2015, 5:40:20 AM11/12/15
to AdWords API Forum
Hi I have problem setting negative campaign criterion ALLOWED_GAMBLING_CONTENT

I can add other contentLabelType types negative criterion (ADULTISH,AFE, ... ),
But when trying to add ALLOWED_GAMBLING_CONTENT I always get error

<h1>SoapFault</h1> <p>[RequiredError.REQUIRED @ operations[0].operand.criterion.contentLabelType]


Umesh Dengale

unread,
Nov 12, 2015, 12:25:45 PM11/12/15
to AdWords API Forum
Hello,

Could you provide the SOAP XML request and response logs for the negative campaign criterion ALLOWED_GAMBLING_CONTENT? Just click Reply privately to author in the forum when responding. Don't forget to remove the developer token in the output.

Thanks,
Umesh, AdWords API Team.

Gasper Mis

unread,
Nov 16, 2015, 2:43:06 AM11/16/15
to AdWords API Forum
[Nov 16 2015 08:33:59.000000 - ERROR] POST /api/adwords/cm/v201509/CampaignCriterionService HTTP/1.1
Connection: Keep-Alive
User-Agent: PHP-SOAP/5.5.12, gzip
Accept-Encoding: gzip, deflate
Content-Encoding: gzip
Content-Type: text/xml; charset=utf-8
SOAPAction: ""
Content-Length: 524
Authorization: Bearer ya29.LgKs9s7vmJR4QCpXsj-azW05rnZeX1oTHNM67Xpg691x_x_XVc3Svk3ULRchHTNyTSr_

<?xml version="1.0" encoding="UTF-8"?>
  <SOAP-ENV:Header>
    <ns1:RequestHeader>
      <ns1:clientCustomerId>8515598967</ns1:clientCustomerId>
      <ns1:developerToken></ns1:developerToken>
      <ns1:userAgent>MrGapoAppTeam (AwApi-PHP/6.4.0, Common-PHP/6.4.0, PHP/5.5.12)</ns1:userAgent>
    </ns1:RequestHeader>
  </SOAP-ENV:Header>
  <SOAP-ENV:Body>
    <ns1:mutate>
      <ns1:operations>
        <ns1:operator>ADD</ns1:operator>
        <ns1:operand xsi:type="ns1:NegativeCampaignCriterion">
          <ns1:campaignId>195810261</ns1:campaignId>
          <ns1:criterion xsi:type="ns1:ContentLabel">
            <ns1:type>CONTENT_LABEL</ns1:type>
            <ns1:contentLabelType>JUVENILE</ns1:contentLabelType>
          </ns1:criterion>
        </ns1:operand>
      </ns1:operations>
      <ns1:operations>
        <ns1:operator>ADD</ns1:operator>
        <ns1:operand xsi:type="ns1:NegativeCampaignCriterion">
          <ns1:campaignId>195810261</ns1:campaignId>
          <ns1:criterion xsi:type="ns1:ContentLabel">
            <ns1:type>CONTENT_LABEL</ns1:type>
            <ns1:contentLabelType>ALLOWED_GAMBLING_CONTENT</ns1:contentLabelType>
          </ns1:criterion>
        </ns1:operand>
      </ns1:operations>
    </ns1:mutate>
  </SOAP-ENV:Body>
</SOAP-ENV:Envelope>

HTTP/1.1 500 Internal Server Error
Content-Type: text/xml; charset=UTF-8
Content-Encoding: gzip
Date: Mon, 16 Nov 2015 07:33:50 GMT
Expires: Mon, 16 Nov 2015 07:33:50 GMT
Cache-Control: private, max-age=0
X-Content-Type-Options: nosniff
X-Frame-Options: SAMEORIGIN
X-XSS-Protection: 1; mode=block
Content-Length: 558
Server: GSE

<?xml version="1.0"?>
<soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/">
  <soap:Header>
      <requestId>000524a36e3484700a8126c340041740</requestId>
      <serviceName>CampaignCriterionService</serviceName>
      <methodName>mutate</methodName>
      <operations>2</operations>
      <responseTime>98</responseTime>
    </ResponseHeader>
  </soap:Header>
  <soap:Body>
    <soap:Fault>
      <faultcode>soap:Server</faultcode>
      <faultstring>[CriterionError.CANNOT_EXCLUDE_CRITERION @ operations[1].operand.criterion.contentLabelType; trigger:'ALLOWED_GAMBLING_CONTENT']</faultstring>
      <detail>
        <ApiExceptionFault xmlns="https://adwords.google.com/api/adwords/cm/v201509">
          <message>[CriterionError.CANNOT_EXCLUDE_CRITERION @ operations[1].operand.criterion.contentLabelType; trigger:'ALLOWED_GAMBLING_CONTENT']</message>
          <ApplicationException.Type>ApiException</ApplicationException.Type>
          <errors xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:type="CriterionError">
            <fieldPath>operations[1].operand.criterion.contentLabelType</fieldPath>
            <trigger>ALLOWED_GAMBLING_CONTENT</trigger>
            <errorString>CriterionError.CANNOT_EXCLUDE_CRITERION</errorString>
            <ApiError.Type>CriterionError</ApiError.Type>
            <reason>CANNOT_EXCLUDE_CRITERION</reason>
          </errors>
        </ApiExceptionFault>
      </detail>
    </soap:Fault>
  </soap:Body>
</soap:Envelope>

Nadine Sundquist (AdWords API Team)

unread,
Nov 16, 2015, 1:18:34 PM11/16/15
to AdWords API Forum
Hi,

The ALLOWED_GAMBLING_CONTENT ContentLabel is excluded by default. This is why it cannot be included as a negative Criterion. Trying to exclude a criterion that is already excluded by default will result in a CANNOT_EXCLUDE_CRITERION error, which is what you're seeing.

Cheers,
Nadine, AdWords API Team   
Reply all
Reply to author
Forward
0 new messages