How to create an active in-stream video creative

935 views
Skip to first unread message

David Lee

unread,
Sep 11, 2017, 3:17:03 PM9/11/17
to Google's DoubleClick Campaign Manager API Forum

I am using https://github.com/googleads/googleads-dfa-reporting-samples/blob/master/java/v2.8/src/main/java/com/google/api/services/samples/dfareporting/creatives/CreateInstreamVideoCreative.java as a guide to create in-stream video creative.

If I add creative.setActive(true);, I get an error saying  "message" : "8157 : An active video creative must have at least one serving file set to include in serving."

If I set active=false, I can create the creative but cannot create an (RotationGroup) and link it to a placement. Error message is "At least one active creative must be assigned to any active ad. Also, the creative must have \"Include in rotation\" set to \"Yes\" in your ad properties"

 I cannot find any method that allows me to set serving files to the creative. So I attempt to update the active=true with a patch request after I create the creative. .

Creative creative = new Creative();
creative.setAdvertiserId(advertiserId);
creative.setName(assetName);
creative.setType("INSTREAM_VIDEO");
creative.setActive(false);
       
// Upload the video asset
CreativeAssetId videoAssetId = uploadAsset(reporting, profileId, advertiserId, assetName, assetPath, "VIDEO").getAssetIdentifier();
CreativeAsset videoAsset = new CreativeAsset().setAssetIdentifier(videoAssetId).setRole("PARENT_VIDEO");
       
// Add the creative assets.
creative.setCreativeAssets(ImmutableList.of(videoAsset));
       
Creative result = reporting.creatives().insert(profileId, creative).execute();
         
// Update active to true. This only works if I delay the request call for a while.
Creative requestBody = new Creative();
requestBody.setActive(true);
Dfareporting.Creatives.Patch request = reporting.creatives().patch(profileId, result.getId(), requestBody);

This unfortunately still doesn't work. I am guessing it takes some time for DCM to process the videos and make them available as serving files.

How do I create an active in-stream video creative so I can create an ad and link it to a placement?
Thanks.

Chris Feldman (DCM API Team)

unread,
Sep 12, 2017, 3:01:19 PM9/12/17
to Google's DoubleClick Campaign Manager API Forum
Hi David,

It sounds like you're uploading a video asset that requires transcoding. In that case, you should insert the creative as active = false, and then make a second request to activate it once transcoding is complete. You can check for the existence of a creativeAsset that's marked as active and has a progressiveServingUrl specified to determine whether transcoding has finished.

Let me know if you have further questions, or if you continue to have issues.

Regards,
Chris Feldman
DCM API Team

jk...@eyereturn.com

unread,
Oct 9, 2018, 4:13:03 PM10/9/18
to Google's DoubleClick Campaign Manager API Forum
Hi Chris,

I've assumed maintenance of this app David Lee created. He implemented what you recommended, but there's still an issue. I can set the video creative to activate after its been transcoded, but the creative's include-in-rotation is still no. How do I set it to yes? I've been looking at the documentation but I can't find it. 

Here's where I'm at with video:
-set creative active (works)
-set creative include in rotation to yes (how?)
-set ad include in rotation to yes (how?)
-set ad to active (not working, API says "message" : "12058 : At least one active creative must be assigned to any active ad. Also, the creative must have \"Include in rotation\" set to \"Yes\" in your ad properties.")

Thanks,
James

Lakshmi Prathipati (DCM API Team)

unread,
Oct 10, 2018, 3:55:17 PM10/10/18
to Google's DoubleClick Campaign Manager API Forum
Hi James,

Please send a private message with the following details:
  1. Sample Creative id
  2. DCM account id
  3. API request for the above error response in JSON format
  4. Profile id
Thanks,
Lakshmi, DCM API Team

On Tuesday, October 9, 2018 at 4:13:03 PM UTC-4,
Reply all
Reply to author
Forward
0 new messages