CANNOT_BID_MODIFY_CRITERION_TYPE

28 views
Skip to first unread message

Rui Zhang

unread,
Nov 28, 2019, 10:53:13 PM11/28/19
to AdWords API and Google Ads API Forum
    I used google ads Api to change keywords bid, but reported a GoogleAdsException error, the code is as follows:
    String keywordResource = ResourceNames.adGroupCriterion (
                     accountId,
                    adGroupId,
                  keywordId);
             AdGroupCriterion.Builder adGroupCriterion = AdGroupCriterion.newBuilder ()
                     .setType (CriterionTypeEnum.CriterionType.KEYWORD)
                     .setResourceName (keywordResource)
                     .setBidModifier (DoubleValue.of (keywordBidToBeUpdated.getNewBid ()));
             AdGroupCriterionOperation operation = AdGroupCriterionOperation.newBuilder ()
                     .setUpdate (adGroupCriterion)
                    .setUpdateMask (FieldMasks.allSetFieldsOf (adGroupCriterion.build ()))
                     .build ();
             operationList.add (operation);
............................
AdGroupCriterionServiceClient.mutateAdGroupCriteria(accountId,operationList);

the error  is :
   com.google.ads.googleads.v2.errors.GoogleAdsException: errors {
  error_code {
    criterion_error: CANNOT_BID_MODIFY_CRITERION_TYPE
  }
  message: "Cannot set bid modifier for this criterion type."
  trigger {
    string_value: ""
  }
  location {
    field_path_elements {
      field_name: "operations"
      index {
      }
    }
    field_path_elements {
      field_name: "update"
    }
    field_path_elements {
      field_name: "bid_modifier"
    }
  }
}

            

Google Ads API Forum Advisor Prod

unread,
Dec 2, 2019, 4:52:41 PM12/2/19
to litb...@gmail.com, adwor...@googlegroups.com

Hello Rui,

Thank you for writing to us. The CANNOT_BID_MODIFY_CRITERION_TYPE error occurs when you cannot set the bid modifier for the criterion type specified in your request. I took a closer look at the shared API request call logs and observed that you are trying to modify the bid for keyword criterion at ad group level which is not supported as you can see here. Let me know if you need any further clarifications.

Regards,
Nikisha Patel, Google Ads API Team



ref:_00D1U1174p._5001UODU8q:ref
Reply all
Reply to author
Forward
0 new messages