Create Campaign through google-ads-python api

77 views
Skip to first unread message

Shivam Kumar

unread,
Feb 5, 2024, 4:57:15 AM2/5/24
to Google Ads API and AdWords API Forum
Hello there,
I am trying to create a new campaign through google ads python api ( https://github.com/googleads/google-ads-python/blob/main/examples/basic_operations/add_campaigns.py ) but I am getting following error:

Request made: ClientCustomerId: xxxxxxx, Host: googleads.googleapis.com, Method: /google.ads.googleads.v15.services.CampaignBudgetService/MutateCampaignBudgets, RequestId: xxxxxx, IsFault: True, FaultMessage: The operation is not allowed for the given context.
Request with ID "xxxxxx" failed with status "INVALID_ARGUMENT" and includes the following errors:
        Error with message "The operation is not allowed for the given context.".
                On field: operations

It seems that there are some issue while creating campaign_budget. Please help me with how I can fix this error.


Thank You
Shivam

Google Ads API Forum Advisor

unread,
Feb 5, 2024, 7:25:29 AM2/5/24
to shiv...@vaticai.com, adwor...@googlegroups.com
Hi Shivam,

Thank you for reaching out to the Google Ads API support team.

After reviewing your concern, I understand that you are encountering an error with the message "The operation is not allowed for the given context." while trying to create a new campaign via the Google Ads API.

In order to assist you further, kindly provide us with the complete API logs (request and response with request-id and request header) generated at your end.

Since you are using the Python client library, if you haven't enabled the logging yet, I would request you to enable it by referring to this guide Python.

You can send the details via Reply privately to the author option, or direct private reply to this email.

 
This message is in relation to case "ref:!00D1U01174p.!5004Q02ryoP1:ref"

Thanks,
 
Google Logo Google Ads API Team


Reply all
Reply to author
Forward
0 new messages