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?
--
--
=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~
Also find us on our blog:
https://googleadsdeveloper.blogspot.com/
=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~
You received this message because you are subscribed to the Google
Groups "AdWords API and Google Ads API Forum" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/adwords-api?hl=en
---
You received this message because you are subscribed to the Google Groups
"Google Ads API and AdWords API Forum" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To view this discussion on the web visit
https://groups.google.com/d/msgid/adwords-api/1301b5ac-f496-4a48-9b25-f12ad8728409n%40googlegroups.com.