Getting ENUM_VALUE_NOT_PERMITTED

85 views
Skip to first unread message

Oliver

unread,
Nov 17, 2021, 7:20:14 AM11/17/21
to AdWords API and Google Ads API Forum
We used the Query Migration Tool to migrate one of our AWQL queries to the below GAQL.  However, when running this query we get an ENUM_VALUE_NOT_PERMITTED error.

SELECT ad_group.id
metrics.clicks,
metrics.impressions  
FROM ad_group_ad 
WHERE campaign.id IN (968861968) 
AND ad_group_ad.status IN (ENABLED) 
AND ad_group.status IN (ENABLED) 
AND ad_group_ad.ad.type IN (EXPANDED_TEXT_AD) 
AND ad_group_ad.policy_summary.approval_status IN (APPROVED) 
AND segments.date DURING LAST_30_DAYS

The error we get is this:

Request ID 4ek3bYb5BvN-OhB3C0yNpQ failed due to GoogleAdsException. Underlying errors:
  Error 0: error_code {
  enum_error: ENUM_VALUE_NOT_PERMITTED
}
message: "The enum value is not permitted."


The query works if we run it without the below line:
AND ad_group_ad.policy_summary.approval_status IN (APPROVED) 


Any idea why this condition is causing an issue?

Oliver

Google Ads API Forum Advisor

unread,
Nov 17, 2021, 6:18:54 PM11/17/21
to oliver....@gmail.com, adwor...@googlegroups.com

Hello Oliver,

Thanks for reaching out. Could you please retry your GAQL query in this field “ad_group_ad.policy_summary.approval_status” with “=” APPROVED instead “
IN” APPROVED.

If the issue still persists, please provide us with the complete request and response logs via the reply privately to the author option.

Reminder: Share your feedback about the Google Ads (AdWords) API! Take the 2021 Google Ads API and AdWords API Annual Survey

Best regards,

Google Logo
Jakeia Sabrina
Google Ads API Team
 

ref:_00D1U1174p._5004Q2R9nAF:ref

Oliver

unread,
Nov 17, 2021, 10:32:39 PM11/17/21
to AdWords API and Google Ads API Forum
Hi Jakeia,

Yes it works if we use = instead of IN.  However, how is this going to work if we want to include more statuses as follows:

AND ad_group_ad.policy_summary.approval_status IN (APPROVED, APPROVED_LIMITED) 

Is it possible to include more than one enum value if we use = ?

Oliver

Google Ads API Forum Advisor

unread,
Nov 18, 2021, 2:12:23 AM11/18/21
to oliver....@gmail.com, adwor...@googlegroups.com

Hi Oliver,

This is Yasar and I work with Jakeia. Let me assist you with this.

No, it’s not possible to include more than one enum value when using ‘=’ operator. However, you may use the same query with the IN operator, but you need to put in a single quote ex. ad_group_ad.policy_summary.approval_status IN ('APPROVED')

Here’s the below working GAQL in the request:

SELECT ad_group.id,

ad_group_ad.ad.id,

metrics.clicks,

metrics.impressions  

FROM ad_group_ad

WHERE campaign.id
 IN (968861968)

AND ad_group_ad.status IN (ENABLED)

AND ad_group.status IN (ENABLED)

AND ad_group_ad.ad.type IN (EXPANDED_TEXT_AD)

AND ad_group_ad.policy_summary.approval_status IN ('APPROVED')

AND segments.date DURING LAST_30_DAYS

Let us know if you have any further questions

Regards,


Reminder: Share your feedback about the Google Ads (AdWords) API! Take the 2021 Google Ads API and AdWords API Annual Survey
 

Google Logo
Yasar
Google Ads API Team
 

 

ref:_00D1U1174p._5004Q2R9nAF:ref

Oliver

unread,
Nov 18, 2021, 2:35:53 AM11/18/21
to AdWords API and Google Ads API Forum
It worked when we used the single quotes.

Thank you very much!

Oliver

Reply all
Reply to author
Forward
0 new messages