CampaignService query to exclude UNIVERSAL_APP_CAMPAIGN

34 views
Skip to first unread message

Andras Kende

unread,
Feb 25, 2018, 9:21:26 PM2/25/18
to AdWords API Forum
Hello,

Im fetching campaign witth the API as:

$campaignService = $adWordsServices->get($session, CampaignService::class);
$page = $campaignService->query("SELECT Id, Name, Status WHERE Status = 'ENABLED' ORDER BY Name ASC"

Later running into an error:
[OperationAccessDenied.OPERATION_NOT_PERMITTED_FOR_CAMPAIGN_TYPE @ operations[0].operand.criterion; trigger:'MULTI_CHANNEL(UNIVERSAL_APP_CAMPAIGN)']


Anyone coul help me howto modify my $campaignService->query to exclude UNIVERSAL_APP_CAMPAIGN type ?

Thank you,

Andras

Luis Xander Talag (AdWords API Team)

unread,
Feb 26, 2018, 2:58:51 AM2/26/18
to AdWords API Forum
Hi Andras,

You may add a condition like AdvertisingChannelType not equal to MULTI_CHANNEL and AdvertisingChannelSubType not equal to UNIVERSAL_APP_CAMPAIGN to your selector query to exclude the Universal App campaign. See code snippet below. 

WHERE AdvertisingChannelType != MULTI_CHANNEL and AdvertisingChannelSubType != UNIVERSAL_APP_CAMPAIGN

Let me know if you have further clarifications. 

Thanks and regards,
Luis
AdWords API Team
Reply all
Reply to author
Forward
0 new messages