'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))
Solution 1:[1]
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.
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
| Solution | Source |
|---|---|
| Solution 1 | Dave Davis |
