AdsApp.YouTubeVideoAssetBuilder
Stay organized with collections
Save and categorize content based on your preferences.
Builds new YouTube video assets.
Typical usage:
var youTubeVideoId = "123ABCabc-_";
var assetOperation = AdsApp.adAssets().newYouTubeVideoAssetBuilder()
.withName("name")
.withYouTubeVideoId(youTubeVideoId)
.build();
var videoAsset = assetOperation.getResult();
Methods:
build()
Creates a video asset. Returns an
AssetOperation that can be
used to get the new video asset (or access any associated errors if the
creation failed).
Return values:
withName(name)
Sets new YouTube video asset's name to the specified value.
Arguments:
| Name | Type | Description |
| name |
String |
The name for the video asset. |
Return values:
withYouTubeVideoId(youTubeVideoId)
Sets YouTube video ID. This field is required.
Arguments:
| Name | Type | Description |
| youTubeVideoId |
String |
The YouTube video ID. |
Return values:
withSyntheticContentAttestation(attestation)
Declares whether or not the new YouTube video asset contains synthetic
(AI-generated) content.
Arguments:
| Name | Type | Description |
| attestation |
String |
The synthetic content attestation, either
"NOT_SYNTHETIC" or "IS_SYNTHETIC". |
Return values:
[null,null,["Last updated 2026-12-02 UTC."],[],[]]