Dear Google Ads Support Team,
I am experiencing an issue while attempting to create a Demand Gen Campaign using the Google Ads API. The campaign budget and bidding strategy were created successfully, but I am encountering an error when trying to create the campaign itself, specifically with the bidding strategy.
Below are the details: 1. Creating Campaign Budget:Request:
Response:
Request:
Response:
Request:
Response:
Error Code: INVALID_ARGUMENT
Message: "Request contains an invalid argument."
Details: "The operation is not allowed for the given context."
Field: bidding_strategy
Trigger: 11537883468 (Bidding Strategy resource name)
It seems that the bidding strategy is not valid for the Demand Gen campaign type. I have confirmed that both the campaign budget and bidding strategy are being created successfully in separate API calls, but the issue arises when I attempt to assign the bidding strategy to the campaign in the final step.
Could you please advise on:
The correct way to assign a bidding strategy to a Demand Gen campaign.
If there are any additional constraints or requirements for Demand Gen campaigns regarding bidding strategies.
Thank you for your assistance, and I look forward to your response.
Best regards,
Ashish
Hi Ashish,
Thank you for reaching out to the Google Ads API support team.
Based on the provided information, it appears that you’ve encountered the "OPERATION_NOT_PERMITTED_FOR_CONTEXT’ error while attempting to create a demand gen campaign via the Google Ads API. This error occurs when an operation is not allowed within the current context. We tried to replicate the same error from my side but we were able to create the campaign successfully without any errors. Kindly refer to the sample request and response bodies below for reference:
{ "operations": [ { "create": { "name": "Hypeddit Demand Gen Campaign", "advertisingChannelType": "DEMAND_GEN", "status": "PAUSED", "startDate": "20250426", "endDate": "20250525", "campaignBudget": "customers/{customerId}/campaignBudgets/{campaign_budget_id}", "biddingStrategy": "customers/{customerId}/biddingStrategies/{biddingStrategyId}" } } ] } { "results": [ { "resourceName": "customers/{customerId}/campaigns/{campaignId}" } ] }
Please be informed that while creating a demand gen campaign check that minimum requirements are met: Demand Gen campaign assets must meet high standards of quality, as they will be served on visual, entertainment-focused surfaces such as Discover and YouTube.
To create a Demand Gen campaign:
![]() |
Google Ads API Team |
[2025-04-25 16:36:31Z GMT] This message is in relation to case "ref:!00D1U01174p.!500Ht01qUyQB:ref" (ADR-00301833)