I'm using googleads-php-lib to access the AdWords API from PHP. In this case I'm trying to perform a fairly simple operation on a "SharedSet" of campaign-level negative keywords.
A var_dump of the batch job operations I'm sending looks as follows.
[
SharedCriterionOperation {#768
+operand: SharedCriterion {#759
+sharedSetId: "1378100563",
+criterion: Keyword {#764
+text: "test3",
+matchType: "BROAD",
+id: null,
+type: null,
+CriterionType: null,
},
+negative: true,
},
+operator: "ADD",
+OperationType: null,
},
SharedCriterionOperation {#776
+operand: SharedCriterion {#757
+sharedSetId: "1378100563",
+criterion: Keyword {#763
+text: "test1",
+matchType: "BROAD",
+id: "22148403",
+type: "KEYWORD",
+CriterionType: "Keyword",
},
+negative: true,
},
+operator: "REMOVE",
+OperationType: null,
},
]
As you can see, my test case is to delete one keyword and add another--but I've also confirmed that each of these operations fails individually. Not only do the operations fail, but results.xml is completely blank:
That's the entire file. I get the same result whether I use API v201509 or v201603.
I don't think I can share the code I'm using to generate this, but suffice to say it's similar to
this Java example (but translated into PHP).
I can't say using the AdWords API has been problem-free in general, but the sheer lack of explanation for this error makes it stand out in a crowded field.