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"
    }
  }
}

            

-- 
-- 
=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~
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.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/adwords-api/8adc7799-927d-4c36-8e82-eeef94433fa9%40googlegroups.com.

Reply via email to