Getting version error while using Google Ads API

377 views
Skip to first unread message

Shipra

unread,
Dec 12, 2023, 8:43:45 AM12/12/23
to Google Ads API and AdWords API Forum
Hey!
While making applies with Google Ads API (C#) . We are getting error stating:  The error code is not in this version. We are facing this error for multiple accounts.

Error Details:

{ "errors": [ { "errorCode": { "criterionError": "UNKNOWN" }, "message": "The error code is not in this version.", "trigger": { "stringValue": "PHRASE" }, "location": { "fieldPathElements": [ { "fieldName": "operations", "index": 0 }, { "fieldName": "create" }, { "fieldName": "keyword" }, { "fieldName": "match_type" } ] }, "details": { "unpublishedErrorCode": "CriterionError.KEYWORD_MATCH_TYPE_INVALID" } } ] }

This error is crucial for us and our team! Could you please help us in resolving this.

Thanks,
Shipra Aggarwal

Google Ads API Forum Advisor

unread,
Dec 12, 2023, 12:25:18 PM12/12/23
to adwor...@googlegroups.com
Hi Shipra,

Thank you for reaching out to the Google Ads API support team.

After reviewing your concern, I understand that you are encountering an error "The error code is not in this version" while using Google Ads API.

In order to investigate the issue further, could you please please provide us with the complete API logs (request and response with request-id and request header) generated at your end. 

If you are using a client library and haven't enabled the logging yet, I would request you to enable logging for the specific client library that you are using. You can refer to the guides Java, .NetPHPPythonRuby or Perl to enable logging at your end. For REST interface requests, you can enable logging via the curl command by using the -i flag.

You can send the details via Reply privately to the author option, or direct private reply to this email.
 
This message is in relation to case "ref:!00D1U01174p.!5004Q02r1Kru:ref"

Thanks,
 
Google Logo Google Ads API Team


be...@hootinteractive.com

unread,
Jun 21, 2024, 6:48:14 AM6/21/24
to Google Ads API and AdWords API Forum
Hi,

Has this been resolved? I have the same issue and it seems a bit random as I have a campaign in which I upload the same data and no errors came up.

Here is the error:

partial_failure_error {
  code: 3
  message: "The error code is not in this version., at mutate_operations[0].ad_group_criterion_operation.create.keyword.match_type"
  details {
    type_url: "type.googleapis.com/google.ads.googleads.v17.errors.GoogleAdsFailure"
    value: "\n\300\001\n\003\200\002\001\022&The error code is not in this version.\032\010*\006PHRASE\"Z\022\025\n\021mutate_operations\030\000\022\036\n\034ad_group_criterion_operation\022\010\n\006create\022\t\n\007keyword\022\014\n\nmatch_type*+\n)CriterionError.KEYWORD_MATCH_TYPE_INVALID\022\026GShrECOBszUTj-1nMZgdHQ"
  }
}
mutate_operation_responses {
  ad_group_criterion_result {
  }
}


Here is the info I'm sending to Google Ads API(mutate_request.mutate_operations):

Operations:
[ad_group_criterion_operation {
   create {
     ad_group: "customers/XXXXXXXXX/adGroups/XXXXXXXXX"
     type_: KEYWORD
     keyword {
       text: "Ford Bronco Sport For Sale"
       match_type: PHRASE
     }
   }
 }]

The error says "KEYWORD_MATCH_TYPE_INVALID" but the match type is correct. I tried changing the match type from "PHRASE" (<KeywordMatchType.PHRASE: 3>) to "BROAD"(<KeywordMatchType.BROAD: 4>) and it worked, so it seems the PHRASE match type is not found.


Python library: google.ads.googleads.v17
Version: 24.1.0

Thanks,
Berto

be...@hootinteractive.com

unread,
Jun 24, 2024, 10:37:36 AM6/24/24
to Google Ads API and AdWords API Forum
Hi,

For anyone who this might be helpful, I found the cause of that error, the campaign had the setting "keyword_match_type" set to "BROAD", so only broad keywords were allowed.

Thanks,
Berto
Reply all
Reply to author
Forward
0 new messages