Help

62 views
Skip to first unread message

Азамат Баймурзин

unread,
Mar 11, 2020, 7:30:02 AM3/11/20
to AdWords API and Google Ads API Forum
I try to test my code with an example and get an error
https://developers.google.com/google-ads/api/docs/samples/get-campaigns
error: the following arguments are required: -c/--customer_id
I understood everything as it should in googleads.yaml
login_customer_id4737816311

Google Ads API Forum Advisor Prod

unread,
Mar 11, 2020, 3:18:19 PM3/11/20
to kzbai...@gmail.com, adwor...@googlegroups.com

Hi,

You can run the python script against your account that holds the campaigns by using the following format:

python3 get_campaigns.py -c ###-###-####

The ###-###-#### is where your customerclientId should be placed. This way, you can make sure the get_campaigns.py code runs against your account. Let me know if you run into further questions.

Thank you,
Bryan, Google Ads API Team

ref:_00D1U1174p._5001UXUlhw:ref

Азамат Баймурзин

unread,
Mar 12, 2020, 6:12:22 AM3/12/20
to AdWords API and Google Ads API Forum
python report.py -c 7509850792
Request made: ClientCustomerId: 7509850792, Host: googleads.googleapis.com:443, Method: /google.ads.googleads.v3.services.GoogleAdsService/SearchStream, RequestId: None, IsFault: True, FaultMessage: User doesn't have permission to access customer. Note: If you're accessing a client customer, the manager's customer id mRequest with ID "None" failed with status "PERMISSION_DENIED" and includes the following errors:
ust be set in the 'login-customer-id' header. See https://developers.google.com/google-aError with message "User doesn't have permission to access customer. Note: If you're accessing a client customer, the manager's customer id must be set in the 'login-customer-id' header. See https://developers.google.com/google-ads/api/docs/concepts/call-structure#login-customer-id".
# python report.py -c 750-985-0792
Request made: ClientCustomerId: 750-985-0792, Host: googleads.googleapis.com:443, Method: /google.ads.googleads.v3.services.GoogleAdsService/SearchStream, RequestId: None, IsFault: True, FaultMessage: Invalid customer ID '750-985-0792'.
Request with ID "None" failed with status "INVALID_ARGUMENT" and includes the following errors:
        Error with message "Invalid customer ID '750-985-0792'.".

четверг, 12 марта 2020 г., 1:18:19 UTC+6 пользователь adsapiforumadvisor написал:
Message has been deleted

Google Ads API Forum Advisor Prod

unread,
Mar 12, 2020, 2:51:48 PM3/12/20
to kzbai...@gmail.com, adwor...@googlegroups.com
Hi,

In the logs you've presented under the "python report.py -c 7509850792" request, I see that you're encountering a Permission_Denied error. Can you please check if the client credentials that you've used in the API call belong to a user that has access to account 7509850792? You can check this by logging into this account, then clicking "Tools & Settings" > "Setup" > "Account Access" and check that the user email associated with your client credentials is give the correct access. Let me know if you have further questions.
Message has been deleted

Google Ads API Forum Advisor Prod

unread,
Mar 13, 2020, 3:19:44 PM3/13/20
to kzbai...@gmail.com, adwor...@googlegroups.com
Hi,

Thank you for the confirmation. Could you please check under the "Users" tab in "Account Access" and check that the email that is listed there matches with the client credential's email that you're using in the API call? Let me know if you need further clarification.
Reply all
Reply to author
Forward
0 new messages