Hi,

I am trying to do the same(adding image extension to adgroup).

//adgroupassetOperation
$adGroupAssetOperation = new AdGroupAssetOperation([
'create' => new AdGroupAsset([
'asset' => $imageAssetResourceName,
'field_type' => AssetFieldType::MARKETING_IMAGE,
'ad_group' => ResourceNames::forAdGroup($clientId, $adGroupId)
])
]);

$adGroupAssetServiceClient = $this->googleAdsClientSession->
getAdGroupAssetServiceClient();
$response = $adGroupAssetServiceClient->mutateAdGroupAssets($clientId, [
$adGroupAssetOperation]);

I am getting the same error : *The given field type is not supported to be 
added directly via asset links.*
assetLinkError: *UNSUPPORTED_FIELD_TYPE*
stringValue: *MARKETING_IMAGE*

could anyone help?

Thanks

On Tuesday, 2 November 2021 at 06:49:06 UTC adsapi wrote:

> Hi Shawn,
>
> Thank you for reaching out to our API support team.
>
> Could you confirm if what you intend to do is use assets in ads? If yes 
> then the link you provided should indeed be the appropriate guide.
>
> However, since you appear to be using the AdGroupAssetService 
> <https://developers.google.com/google-ads/api/reference/rpc/v8/AdGroupAssetService?hl=en>,
>  
> then its typical usage is for creating asset based extensions as discussed 
> here 
> <https://developers.google.com/google-ads/api/docs/extensions/assets/migrating-extensions?hl=en#associate_the_asset_with_campaigns_and_ad_groups>
> . 
>
> Best regards,
>
> [image: Google Logo] 
> Peter Laurence Napa Oliquino 
> Google Ads API Team 
>   
>
> ref:_00D1U1174p._5004Q2QGllD:ref
>

-- 
-- 
=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~
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 adwords-api@googlegroups.com
To unsubscribe from this group, send email to
adwords-api+unsubscr...@googlegroups.com
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 
"AdWords API and Google Ads API Forum" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to adwords-api+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/adwords-api/2319ea29-85e4-491b-989d-20f3b7ff9ba0n%40googlegroups.com.
  • as... Shawn Naquin
    • ... 'Google Ads API Forum Advisor' via AdWords API and Google Ads API Forum
      • ... Shirly J
        • ... 'Google Ads API Forum Advisor' via AdWords API and Google Ads API Forum
          • ... Shirly J
          • ... Shirly J
            • ... 'Google Ads API Forum Advisor' via AdWords API and Google Ads API Forum
              • ... Algirdas Jarockis
                • ... 'Google Ads API Forum Advisor' via AdWords API and Google Ads API Forum

Reply via email to