campaign creation operation for update audience status

26 views
Skip to first unread message

SJ Sagar

unread,
Aug 4, 2022, 3:54:30 PM8/4/22
to Google Ads API and AdWords API Forum
can any one help me 

$campaignCriterion = new CampaignCriterion([
'campaign' =>ResourceNames::forCampaign($customer, $campaignId),
'status' => $postData['status']=='ENABLE'?CampaignCriterionStatus::ENABLED:CampaignCriterionStatus::PAUSED,
]);
$campaignCriterionOperation = new CampaignCriterionOperation();
$campaignCriterionOperation->setUpdate($campaignCriterion);
$campaignCriterionOperation->setUpdateMask(FieldMasks::allSetFieldsOf($campaignCriterion));
$campaignCriterionServiceClient = $googleAdsClient->getCampaignCriterionServiceClient();
$response = $campaignCriterionServiceClient->mutateCampaignCriteria($clientId, [$campaignCriterionOperation]);


this code is not working 

Response invalid argument status

Google Ads API Forum Advisor

unread,
Aug 4, 2022, 10:00:02 PM8/4/22
to sagarji...@gmail.com, adwor...@googlegroups.com

Hi SJ,
 

Thanks for reaching out to the Google Ads API team. I hope you are doing well today.
 

With regards to your concern. to better check this issue, could you provide the complete request and response logs with request ID and request header generated on your end? So our team further investigates and gives guidance on this.
 

It seems you are using PHP client library, If you haven't enabled the logging of the API transactions for this, then please refer to the specific guide below:


You can provide it via Reply privately to the author option. If this option is not available, then send it instead on this email address googleadsa...@google.com.
 

Regards,

Google Logo
Darwin
Google Ads API Team
 


ref:_00D1U1174p._5004Q2dHakd:ref
Reply all
Reply to author
Forward
0 new messages