Hello Binu,
Welcome to Google Ads API Support team. Thank you for reaching out to us.
We do have sample code for creating assets here (https://developers.google.com/google-ads/api/docs/assets/working-with-assets#create_an_asset). But instead of creating image asset you can replace that with youtube_video_asset (https://developers.google.com/google-ads/api/reference/rpc/v13/YoutubeVideoAsset) as shown here in asset data (https://developers.google.com/google-ads/api/reference/rpc/v13/Asset#asset_data).
Let us know should you have further questions.
Regards,
![]() |
Google Ads API Team |
Hi Binu,
Thank you for getting back to us.
We have already shared a sample code for creating assets in our previous response. However, allow me to share the link again specifying php code here (https://developers.google.com/google-ads/api/docs/assets/working-with-assets#php). As mentioned, instead of creating image asset, you can replace that with youtube_video_asset (https://developers.google.com/google-ads/api/reference/rpc/v13/YoutubeVideoAsset) as shown here in asset data (https://developers.google.com/google-ads/api/reference/rpc/v13/Asset#asset_data).
Please let us know how it goes on your end.