API call to dfareporting.ads.insert failed with error: 12043 : Creative must be assigned to the campaign before it can be associated with the ad

122 views Asked by At

How cm369 api assigns a creative to a campaign?

var campaign = DoubleClickCampaigns.Campaigns.get(profileID, ss.getRangeByName(named_range_campaign_id).getValue());
if (campaign.creativeGroupIds == undefined){
  campaign.creativeGroupIds = [];
}
//campaign.creative = campaign.creativeGroupIds.concat(creative.id);

DoubleClickCampaigns.Campaigns.update(campaign, profileID);

Following this doc I have tried to create a creative.

I get this error, but cannot find the API way to assign a creative to a campaign.

1

There are 1 answers

0
Elad Benda On