I have this code that bid adjust on a specific keyword: *$adGroupCriterionService = $adWordsServices->get($session, AdGroupCriterionService::class);*
* $operations = [];* * $keyword = new Keyword();* * $keyword->setId($criterionId);* * $keyword->setText('best science magazines');* * $keyword->setMatchType(KeywordMatchType::BROAD);* * $adGroupCriterion = new BiddableAdGroupCriterion();* * $adGroupCriterion->setAdGroupId($adGroupId);* * $adGroupCriterion->setCriterion($keyword);* * $adGroupCriterion->setBidModifier(1.5);* * // Create ad group criterion operation and add it to the list.* * $operation = new AdGroupCriterionOperation();* * $operation->setOperand($adGroupCriterion);* * $operation->setOperator(Operator::ADD);* * $operations[] = $operation;* * // Create the ad group criteria on the server and print out some information* * // for each created ad group criterion.* * // try {* * $result = $adGroupCriterionService->mutate($operations);* * // } catch (\Exception $e) {* * // return array(* * // "status" => "fail",* * // "message" => 'Caught exception: '. $e->getMessage()* * // );* * // }* * $adGroupCriterion = $result->getValue()[0];* * $data = array(* * "message" => "Keyword with ID %d has updated final URL ",* * "id" => $adGroupCriterion->getCriterion()->getId()* * );* * array_push(self::$keywords, $data);* The error is: *<br />* *<b>Fatal error</b>: Uncaught Google\AdsApi\AdWords\v201806\cm\ApiException: [CriterionError.CANNOT_BID_MODIFY_CRITERION_TYPE @ operations[0].operand.bidModifier] in /Applications/MAMP/htdocs/native_adwords/vendor/googleads/googleads-php-lib/src/Google/AdsApi/Common/Util/Reflection.php:43* *Stack trace:* *#0 /Applications/MAMP/htdocs/native_adwords/vendor/googleads/googleads-php-lib/src/Google/AdsApi/Common/Util/Reflection.php(43): ReflectionClass->newInstanceArgs(Array)* *#1 /Applications/MAMP/htdocs/native_adwords/vendor/googleads/googleads-php-lib/src/Google/AdsApi/Common/AdsSoapClient.php(202): Google\AdsApi\Common\Util\Reflection->createInstance('Google\\AdsApi\\A...', Array)* *#2 /Applications/MAMP/htdocs/native_adwords/vendor/googleads/googleads-php-lib/src/Google/AdsApi/Common/AdsSoapClient.php(164): Google\AdsApi\Common\AdsSoapClient->parseApiExceptionFromSoapFault(Object(SoapFault))* *#3 /Applications/MAMP/htdocs/native_adwords/vendor/googleads/googleads-php-lib/src/Google/AdsApi/AdWords/v201806/cm/AdGroupCriterionService.php(198 in* *<b>/Applications/MAMP/htdocs/native_adwords/vendor/googleads/googleads-php-lib/src/Google/AdsApi/Common/Util/Reflection.php</b> on line* *<b>43</b>* *<br />* -- -- =~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~ 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. Visit this group at https://groups.google.com/group/adwords-api. To view this discussion on the web visit https://groups.google.com/d/msgid/adwords-api/d64ca82b-4944-4855-bc63-568c0c893a1f%40googlegroups.com. For more options, visit https://groups.google.com/d/optout.