I'm using the new IP blocking functionality added in V201402 
(https://developers.google.com/adwords/api/docs/reference/v201402/CampaignCriterionService.IpBlock),
 
but having an issue trying to block anything but a single IP. That link 
shows that we should be able to block Class C network using a mask, but I 
get an invalid IP address method when I try to block 70.210.9.1/24:

<SOAP-ENV:Envelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"; 
xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/"; 
><SOAP-ENV:Header><RequestHeader 
xmlns="https://adwords.google.com/api/adwords/cm/v201402";><clientCustomerId 
xmlns="https://adwords.google.com/api/adwords/cm/v201402";>REDACTED</clientCustomerId><developerToken
 
xmlns="https://adwords.google.com/api/adwords/cm/v201402";>REDACTED</developerToken><userAgent
 
xmlns="https://adwords.google.com/api/adwords/cm/v201402";>REDACTED</userAgent><validateOnly
 
xmlns="https://adwords.google.com/api/adwords/cm/v201402";>false</validateOnly><partialFailure
 
xmlns="https://adwords.google.com/api/adwords/cm/v201402";>false</partialFailure></RequestHeader></SOAP-ENV:Header><SOAP-ENV:Body><mutate
 
xmlns="https://adwords.google.com/api/adwords/cm/v201402";><operations><operator>ADD</operator><operand
 
xsi:type="NegativeCampaignCriterion" 
><campaignId>181798627</campaignId><criterion xsi:type="IpBlock" 
><ipAddress>70.210.9.1/24</ipAddress></criterion></operand></operations></mutate></SOAP-ENV:Body></SOAP-ENV:Envelope>

[14 Apr 2014 18:57:31,612 - INFO ] Incoming response:

<soap:Envelope 
xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/";><soap:Header><ResponseHeader
 
xmlns="https://adwords.google.com/api/adwords/cm/v201402";><requestId>0004f705416b1e980ae67d8200003d24</requestId><serviceName>CampaignCriterionService</serviceName><methodName>mutate</methodName><operations>0</operations><responseTime>309</responseTime></ResponseHeader></soap:Header><soap:Body><soap:Fault><faultcode>soap:Server</faultcode><faultstring>[CriterionError.INVALID_IP_ADDRESS
 
@ 
operations[0].operand.criterion.ipAddress]</faultstring><detail><ApiExceptionFault
 
xmlns="https://adwords.google.com/api/adwords/cm/v201402";><message>[CriterionError.INVALID_IP_ADDRESS
 
@ 
operations[0].operand.criterion.ipAddress]</message><ApplicationException.Type>ApiException</ApplicationException.Type><errors
 
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"; 
xsi:type="CriterionError"><fieldPath>operations[0].operand.criterion.ipAddress</fieldPath><trigger></trigger><errorString>CriterionError.INVALID_IP_ADDRESS</errorString><ApiError.Type>CriterionError</ApiError.Type><reason>UNKNOWN</reason></errors></ApiExceptionFault></detail></soap:Fault></soap:Body></soap:Envelope>

Plain IPs (70.210.9.1) and using a /32 (70.210.9.1/32) both work fine, 
which implies (along with the docs) that I should be using the format 
above. I also tried with 70.210.9.* as the UI uses but get the same error 
there.

Ideas?

-- 
-- 
=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~
Also find us on our blog and Google+:
https://googleadsdeveloper.blogspot.com/
https://plus.google.com/+GoogleAdsDevelopers/posts
=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~

You received this message because you are subscribed to the Google
Groups "AdWords API Forum" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
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 Forum" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
For more options, visit https://groups.google.com/d/optout.

Reply via email to