restgoogle-ads-apigoogle-experiments

Google Ads REST API: The operation is not allowed for the given context., at operations[0]


I was trying to create a campaigBudget:mutate with all information that Google Ads API ask for, but no result, they show me only one error :

The operation is not allowed for the given context., at operations[0]

this screenshot may help you guys:

HEADER: enter image description here

BODY (Req & Res): enter image description here

and this is an example from Google Ads API: enter image description here

Thank you


Solution

  • After research I found that the problem was CUSTOMER_ID

    In header we should set : login-customer-id => MANAGER_CUSTOMER_ID

    and in endpoint url we should set : /customers/CUSTOMER_ID/campaignBudgets:mutate