How to filter only active accounts with Google Ads API

94 views
Skip to first unread message

Jerfareza Daviano

unread,
Nov 12, 2020, 8:27:22 PM11/12/20
to AdWords API and Google Ads API Forum
Hi Google Ads API team

I'm using Google Ads API to work with ads in my organization. Now we need to filter out inactive customers (those who have not spent any in 15 months and thus got cancelled).

As of API v5 (the version we are expecting to use for production), is there a way to find out if a customer is inactive/cancelled so we won't be getting authorization error? I'm talking about something like getting the list of all customers using search stream (via Google Ads Query Language) with customer status = active as filter, then proceed with only active customers. Would this be possible? Or if there's no way to do that yet, what would be the workaround to mitigate getting the error?

PS: I realize in Google Adwords API this yields AuthorizationError.CUSTOMER_NOT_ACTIVE error but I'm not sure if similar error will happen in the new Google Ads API.

Any pointers would be helpful.

Thank you very much.

Google Ads API Forum Advisor Prod

unread,
Nov 13, 2020, 11:58:02 AM11/13/20
to j-da...@pdc.proto-g.co.jp, adwor...@googlegroups.com

Hi Jerfareza,

Thank you for reaching out. In Google Ads API you would encounter a similar error AuthorizationError.CUSTOMER_NOT_ENABLED. It is currently not available to filter out the inactive or cancelled account in the APIs. There is a feature request to support this functionality in the Google Ads API. Please keep an eye on our blog for the announcements and updates on new releases.

Thanks and regards,
Xiaoming, Google Ads API Team

 

Google Logo
Xiaoming
Google Ads API Team
 


ref:_00D1U1174p._5004Q27tXzx:ref

Jerfareza Daviano

unread,
Nov 15, 2020, 7:18:26 PM11/15/20
to AdWords API and Google Ads API Forum
Thanks for replying.

So I'm guessing at the moment I just have to handle CUSTOMER_NOT_ENABLED error when a customer is not active/cancelled and skip processing that customer.
Is there a pull request/link somewhere about the feature request you're talking about?

Google Ads API Forum Advisor Prod

unread,
Nov 16, 2020, 2:36:29 PM11/16/20
to j-da...@pdc.proto-g.co.jp, adwor...@googlegroups.com

Hi Jerfareza,

Thank you for reaching out. Yes, you could try to handle that error. There isn’t a link to monitor the progress of the feature request. We will keep you updated. Please also keep an eye on our blog for the announcements and updates on new releases.



Thanks and regards,
Xiaoming, Google Ads API Team

 

Reply all
Reply to author
Forward
0 new messages