Databricks error: "The following arguments are required: -c/--customer_id"

89 views
Skip to first unread message

Fábio Soldá Barbosa Araujo

unread,
Jun 5, 2023, 5:48:10 PM6/5/23
to Google Ads API and AdWords API Forum
Dear all,

I'm trying to retrieve data from Google Ads, and I'm experiencing troubles, even if I got from the code from this link: Get Campaigns  |  Google Ads API  |  Google for Developers and configured google_ads.yaml accordingly. Even replacing "login_customer_id" by "customer_id" in the YAML file didn't work and I'm getting the same error. What could be happening?

Thanks in advance,
Fábio

Google Ads API Forum Advisor

unread,
Jun 8, 2023, 12:19:48 PM6/8/23
to fabio....@br.experian.com, adwor...@googlegroups.com

Hi Fábio,

Thanks for reaching out to the Google Ads API Forum.

You may note that you don’t need to replace "login_customer_id" by "customer_id" in the YAML file. You will need to ensure that the user / email address you used to generate the credentials indeed has access to the account in your request. If the user / email address has access or is associated with the MCC / manager account, you will need to specify the said MCC / manager account's ID as the value of the login-customer-id field.

However, regarding the error message “The following arguments are required: -c/--customer_id”, you may need to pass the customer_id inside get_campaigns.py code example. You may see below code snippet where you may need to pass customer_id.

:
:
:
try:

        main(googleads_client, args.customer_id)

    except GoogleAdsException as ex:
:
:

 


If you’re running Python client library code using terminal, then the value is passed via the command line when executing the example, so for instance, note the -c flag in the below command:

python examples/basic_operations/get_campaigns.py -c 123456789


Let us know if this helps. 

This message is in relation to case "ref:_00D1U1174p._5004Q2m9ggV:ref"

Thanks,
 
Google Logo Google Ads API Team

 

 



Reply all
Reply to author
Forward
0 new messages