I am using AdGroupCriterion to add multiple CRM user lists 
<https://developers.google.com/google-ads/api/docs/remarketing/audience-types/customer-match>
 
to Ad Group and set the bid adjustments on each CRM user list. using the 
following code snippet. 

String adGroup = ResourceNames.adGroup(customerId, adGroupId);
        String userList = ResourceNames.userList(customerId, userListId);
        AdGroupCriterion adGroupCriterion = AdGroupCriterion.newBuilder()
                
.setStatus(AdGroupCriterionStatusEnum.AdGroupCriterionStatus.PAUSED)
                
.setUserList(UserListInfo.newBuilder().setUserList(userList).build())
                .setAdGroup(adGroup)
                .setBidModifier(1)
                .build();
        AdGroupCriterionOperation operation = 
AdGroupCriterionOperation.newBuilder().setCreate(adGroupCriterion).build();

        try(AdGroupCriterionServiceClient serviceClient =
                    
googleAdsClient.getLatestVersion().createAdGroupCriterionServiceClient()){
            MutateAdGroupCriteriaResponse response = 
serviceClient.mutateAdGroupCriteria(Long.toString(customerId), 
ImmutableList.of(operation));
            System.out.println("AdGroupCriterion is created " + 
response.getResults(0).getResourceName());


and getting following error 

Response
--------
Headers: 
Metadata(content-type=application/grpc,request-id=qAPEV98H_Cr9epJpQpbylg,date=Wed,
 
16 Feb 2022 13:05:14 GMT,alt-svc=h3=":443"; ma=2592000,h3-29=":443"; 
ma=2592000,h3-Q050=":443"; ma=2592000,h3-Q046=":443"; 
ma=2592000,h3-Q043=":443"; ma=2592000,quic=":443"; ma=2592000; v="46,43")
Body: null
Failure message: errors {
  error_code {
    request_error: UNKNOWN
  }
  message: "The error code is not in this version."
  trigger {
    int64_value: 7095033345
  }
  location {
    field_path_elements {
      field_name: "operations"
      index: 0
    }
    field_path_elements {
      field_name: "create"
    }
    field_path_elements {
      field_name: "user_list"
    }
    field_path_elements {
      field_name: "user_list"
    }
  }
}
request_id: "qAPEV98H_Cr9epJpQpbylg"

Status: Status{code=INVALID_ARGUMENT, description=Request contains an 
invalid argument., cause=null}.
Exception in thread "main" 
com.google.ads.googleads.v9.errors.GoogleAdsException: errors {
  error_code {
    request_error: UNKNOWN
  }
  message: "The error code is not in this version."
  trigger {
    int64_value: 7095033345
  }
  location {
    field_path_elements {
      field_name: "operations"
      index: 0
    }
    field_path_elements {
      field_name: "create"
    }
    field_path_elements {
      field_name: "user_list"
    }
    field_path_elements {
      field_name: "user_list"
    }
  }
}
request_id: "qAPEV98H_Cr9epJpQpbylg"

        }
Questions:-
is it right way to set bid modifier for user list in Ad Group? 
Not able to get failure reason from error message. How do we get more info 

-- 
-- 
=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~
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 
"Google Ads API and AdWords 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/44afead8-302f-42b9-92ba-4d49eb8ff588n%40googlegroups.com.

Reply via email to