How to get a list of all customer clients through the Google Ads API v3 (REST)

91 views
Skip to first unread message

Runar Jørgensen

unread,
Jun 12, 2020, 10:13:28 AM6/12/20
to AdWords API and Google Ads API Forum
I'm trying to fetch all related customer clients using the REST version of the Google Ads API v3, but I currently get no results when trying to query for a client customer list using the "googleAds:search" endpoint.

My query looks like this:

Query: "SELECT customer_client.resource_name FROM customer_client"

This returns a 200 response with only the fieldMask as a response.

Related CURL command:

curl --request POST \
  --header 'authorization: Bearer {accessToken}' \
  --header 'content-type: application/json' \
  --header 'developer-token: {productionDeveloperToken}' \
  --header 'login-customer-id: {mccId}' \
  --data '{
"query": "SELECT customer_client.resource_name FROM customer_client"
}'

The funny thing is that almost the same query works on the deprecated v1 API:

Query: "SELECT customer.id, customer_client.resource_name, customer_client.level, customer_client.client_customer FROM customer_client LIMIT 100"

This gives me 4 results with all accounts, including my MCC account.

Are there any known issues with this type of query in v3 of the API, or are there some required fields that i might have overlooked? Are there any other endpoints I'm supposed to use to get my desired result? (A human readable list of all customer clients, including at least id and name)

(All this is being tested in a test environment where I've created a test mcc account that contains 3 customer clients and a few campaigns. No production data.)

Google Ads API Forum Advisor Prod

unread,
Jun 12, 2020, 1:59:52 PM6/12/20
to ru...@sempro.no, adwor...@googlegroups.com
Hi Runar,

Thank you for reaching out. Can you please share your client customer ID via Reply privately to author so I can further investigate the issue?

Regards,
Mitchell
Google Ads API Team

ref:_00D1U1174p._5004Q20YObl:ref
Reply all
Reply to author
Forward
0 new messages