Hi, I'm here asking for support because I want to create my as set with LocalAdInfo and give possibility to upload a youtube video, but ad said on the referece in google ads api. videos field is optional, so I tried to send a payload of LocalAdInfo with no videos field and i got the Too few error on it like is a requested field
Google\ApiCore\ApiException: {
"message": "Request contains an invalid argument.",
"code": 3,
"status": "INVALID_ARGUMENT",
"details": [
{
"@type": "
type.googleapis.com\/google.ads.googleads.v11.errors.GoogleAdsFailure",
"errors": [
{
"errorCode": {
"collectionSizeError": "TOO_FEW"
},
"message": "Too few.",
"location": {
"fieldPathElements": [
{
"fieldName": "operations",
"index": 0
},
{
"fieldName": "create"
},
{
"fieldName": "ad"
},
{
"fieldName": "local_ad"
},
{
"fieldName": "videos"
}
]
}
}
],
"requestId": "JntdZDjYo3c49yE3RDnkOw"
}
]
}
This is my error and
$adGroupAd = new AdGroupAd([
'ad_group' => $adGroupResourceName,
'status' => $data['ad_status'],
'ad' => new Ad([
'final_urls' => $data['ad_final_urls'],
'local_ad' => new LocalAdInfo([
'headlines' => $headlinesTextAssetArray,
'descriptions' => $descriptionTextAssetArray,
'call_to_actions' => $callToActionTextAssetArray,
// Sets the marketing image and logo image assets.
'marketing_images' => $marketingImageAssetArray,
'logo_images' => $logoImageAssetArray,
'videos' => []
])
])
]);
This is like i use it
There is a good way for specify that there is no video in the local ad with PHP sdk for publish the ad anyay?