How to set request header in google ads api
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))
The problem is in the error message you received. It's a little confusing and it got me too.
In your case, both of the below are the same:
login-customer-id: 1324567891
customer-id: 1324567891
These need to be different.
login-customer-id: <- Set the CID of your Manager Account here
customer-id: 1324567891 <- Set the CID of the actual Google Ads Account you want to manage here.
What if there are multiple clients and want to fetch data one by one?
What would be the use case for that? Multiple API clients or multiple client accounts?
saved me, it was never clear from the docs