Hi,

I am trying add a exist video to a exist ad group using tihs url 
"https://googleads.googleapis.com/v15/customers/xxxxxx/adGroupAssets:mutate";. 
But it return error  ""assetLinkError": "UNSUPPORTED_FIELD_TYPE"".  "message": 
"The given field type is not supported to be added directly through asset 
links.",

Below is my code using go.
operations := make([]*services.AdGroupAssetOperation, 0)
adGroupAd := resources.AdGroupAsset{}
adGroupAd.AdGroup = "customers/xxxxxx/adGroups/166011065928"
adGroupAd.Asset = "customers/xxxxxx/assets/128153732981"
adGroupAd.FieldType = enums.AssetFieldTypeEnum_YOUTUBE_VIDEO

adGroupAdOperation_create := services.AdGroupAssetOperation_Create{}
adGroupAdOperation_create.Create = &adGroupAd

operation := services.AdGroupAssetOperation{}
operation.Operation = &adGroupAdOperation_create
operations = append(operations, &operation)

req := services.MutateAdGroupAssetsRequest{}

req.Operations = operations
req.CustomerId = "xxxxxx"
requestBody, err := protojson.Marshal(&req)
if err != nil {
panic(err)
}
//fmt.Println(requestBody)
request, err := http.NewRequest("POST", 
"https://googleads.googleapis.com/v15/customers/xxxxxx/adGroupAssets:mutate";, 
bytes.NewBuffer(requestBody))
if err != nil {
panic(err)
}

Thanks.

-- 
-- 
=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~
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/7be2e994-b1bf-4781-9620-bcf3e725de94n%40googlegroups.com.

Reply via email to