Hi Pinkesh, The CANNOT_BID_MODIFY_CRITERION_TYPE <https://developers.google.com/adwords/api/docs/reference/v201802/AdGroupBidModifierService.CriterionError#reason> error indicates that you cannot set bid modifier for this criterion. Upon checking, setting bid modifier for AgeRange is not supported in the Adgroup level as you can see here <https://developers.google.com/adwords/api/docs/reference/v201809/AdGroupBidModifierService.AdGroupBidModifier#criterion> .
Let me know if you have further clarifications. Thanks, Peter AdWords API Team On Wednesday, January 9, 2019 at 8:03:14 AM UTC+8, pinkesh singh wrote: > > i am using below code > > $adGroupBidModifierService = $adWordsServices->get($session, > AdGroupBidModifierService::class); > > $operations = []; > > // Prepare to add an ad group level override. > $adGroupBidModifier = new AdGroupBidModifier(); > //pr($adGroupBidModifier); > $adGroupBidModifier->setAdGroupId(67476925129); > $adGroupBidModifier->setCriterion(new AgeRange()); > $adGroupBidModifier->getCriterion()->setId(503002); > $adGroupBidModifier->setBidModifier(1.5); > //pr($adGroupBidModifier); > > $operation = new AdGroupBidModifierOperation(); > > // Create an ad group bid modifier operation and add it to the list. > $operation->setOperator(Operator::SET); > $operation->setOperand($adGroupBidModifier); > $operations[] = $operation; > > // Create the ad group bid modifier on the server and print out some > // information for each created ad group criterion. > try { > $result = $adGroupBidModifierService->mutate($operations); > // pr($result); > foreach ($result->getValue() as $adGroupBidModifier) { > $response[] = [ > 'ad_group_id' => $adGroupBidModifier->getAdGroupId(), > 'criterion_id' => $adGroupBidModifier->getCriterion()->getId(), > 'ad_group_level_modifier' => $adGroupBidModifier->getBidModifier() > ]; > } > return ['status' => true, 'message' => "Bid Modified", 'data' => > $response]; > } catch (ApiException $apiException) { > handleException($apiException); > } > > > > > > gives CANNOT_BID_MODIFY_CRITERION_TYPE error > > > -- -- =~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~ 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/7edc140d-a585-40e1-a776-fd41d2fbc950%40googlegroups.com. For more options, visit https://groups.google.com/d/optout.