How to set request header in google ads api

20 views
Skip to first unread message

Kasper Aamodt

unread,
Aug 17, 2020, 7:17:08 AM8/17/20
to AdWords API and Google Ads API Forum

0

I want to propose a budget for an ads account under my manager account. I have the following YAML file:

developer_token: 13245
login-customer-id: 1324567891
customer-id: 1324567891
user_agent:  13245
client_id: 13245
client_secret: 13245
refresh_token: 13245

When i try to run my script, i get this error:

Error 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.

This is the code that i use, from the example python library:

    try:
    account_budget_proposal_response = (
      account_budget_proposal_service.mutate_account_budget_proposal(
          customer_id, account_budget_proposal_operation))
I know that i somehow havent set the login_customer_id right in the header, how do i implement it?

Google Ads API Forum Advisor Prod

unread,
Aug 17, 2020, 3:38:45 PM8/17/20
to kasper...@mintmedia.as, adwor...@googlegroups.com
Hi Kasper,

Thanks for reaching out! You would set your login_customer_id in your YAML file. However, upon investigating, I noticed that 1324567891 does not exist as a Google Ads account. Can you confirm if the configuration you provided is correct? Based off the screenshot, none of the fields in your YAML file are correct. Please follow this guide in order to ensure that you are using the correct parameters within your YAML file.

Once you have input the correct parameters within your YAML file, please try making the request again. If you are still encountering errors, please provide the correct customerClientId, the complete detailed logs of the request and response, and the email used to authenticate the API call via the Reply privately to author option. If this option is not available to you, you can email us directly at our support alias googleadsa...@google.com

Regards,
Danica, Google Ads API Team

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