How to get a customer ID

49 views
Skip to first unread message

Seiya Watanabe

unread,
Jun 9, 2022, 5:42:35 AM6/9/22
to Google Ads API and AdWords API Forum
hello

We are creating a web service that allows you to browse a list of advertising campaigns.
I want to get a list of advertising campaigns with as little client effort as possible.
I understand that a customer ID is required to get a campaign.
Currently, the client copies the customer ID directly from the google ads dashboard and manually enters it into the web service.
I want to eliminate manual input.
Is there a way to select a customer ID during OAuth or get a list of customer IDs after OAuth?

I hope you have good advice.

Google Ads API Forum Advisor

unread,
Jun 9, 2022, 7:40:25 AM6/9/22
to s.wat...@illustrious.co.jp, adwor...@googlegroups.com
Hi Seiya,

Thank you for reaching out to us.

You can list customers accessible to you with the ListAccessibleCustomers method in CustomerService . However, it is necessary to understand which customers are returned in this type of request. You may check this documentation for more information.

Best regards,
Google Logo
Heidi
Google Ads API Team
 


ref:_00D1U1174p._5004Q2b5zrO:ref

Seiya Watanabe

unread,
Jun 10, 2022, 2:14:20 AM6/10/22
to Google Ads API and AdWords API Forum
This is what I was looking for! 
Thank you very much!

2022年6月9日木曜日 20:40:25 UTC+9 adsapi:

Seiya Watanabe

unread,
Jun 10, 2022, 2:20:50 AM6/10/22
to Google Ads API and AdWords API Forum
["customers / xxxxxx", "customers / xxxxxx", "customers / xxxxxx", "customers / xxxxxx"] 
 I was able to get the above response. 
 Is there a way to get the customer's name at the same time?

2022年6月9日木曜日 20:40:25 UTC+9 adsapi:
Hi Seiya,

Google Ads API Forum Advisor

unread,
Jun 10, 2022, 4:46:29 AM6/10/22
to s.wat...@illustrious.co.jp, adwor...@googlegroups.com
Hi Seiya,

Thank you for the reply.

You may use the customer_client.descriptive_name along with the customer_client.resource_name field in the customer_client report to get the descriptive name for the client and resource name of the customer client. CustomerClient resource names have the form: customers/{customer_id}/customerClients/{client_customer_id}
Reply all
Reply to author
Forward
0 new messages