According to this document, it is possible to add images to search ad group 
to enrich the 
ads: https://support.google.com/google-ads/answer/9566341?hl=en

Can you show an example of how to use APIs to do so? O could not find a way.

I tried to use "AdGroupAssets" but that failed, see my error log:

Request
-------
Method Name: 
/google.ads.googleads.v10.services.AdGroupAssetService/MutateAdGroupAssets
Host: googleads.googleapis.com
Headers: {
    "x-goog-api-client": "gl-php\/8.1.3 gccl\/14.0.0 gapic\/14.0.0 
gax\/1.7.0 grpc\/1.44.0",
    "x-goog-request-params": "customer_id=XXXX",
    "developer-token": "REDACTED"
}
Request: 
{"customerId":"XXXX","operations":[{"create":{"adGroup":"customers/XXXX
/adGroups/136095741963","asset":"customers/XXXX
/assets/12360514046","fieldType":"SQUARE_MARKETING_IMAGE"}},{"create":{"adGroup":"customers/
XXXX
/adGroups/136095741963","asset":"customers/1926380188/assets/12363615942","fieldType":"SQUARE_MARKETING_IMAGE"}},{"create":{"adGroup":"customers/
XXXX/adGroups/136095741963","asset":"customers/XXXX
/assets/12363620082","fieldType":"MARKETING_IMAGE"}}]}

Response
-------
Headers: {
    "request-id": "xaUKOsYsF9-tkFeomyp4-w",
    "date": "Mon, 09 May 2022 12:30:03 GMT",
    "alt-svc": "h3=\":443\"; ma=2592000,h3-29=\":443\"; 
ma=2592000,h3-Q050=\":443\"; ma=2592000,h3-Q046=\":443\"; 
ma=2592000,h3-Q043=\":443\"; ma=2592000,quic=\":443\"; ma=2592000; 
v=\"46,43\""
}

Fault
-------
Status code: 3
Details: Request contains an invalid argument.
Failure: 
{"errors":[{"errorCode":{"assetLinkError":"UNSUPPORTED_FIELD_TYPE"},"message":"The
 
given field type is not supported to be added directly via asset 
links.","trigger":{"stringValue":"SQUARE_MARKETING_IMAGE"},"location":{"fieldPathElements":[{"fieldName":"operations","index":0},{"fieldName":"create"},{"fieldName":"field_type"}]}},{"errorCode":{"assetLinkError":"UNSUPPORTED_FIELD_TYPE"},"message":"The
 
given field type is not supported to be added directly via asset 
links.","trigger":{"stringValue":"SQUARE_MARKETING_IMAGE"},"location":{"fieldPathElements":[{"fieldName":"operations","index":1},{"fieldName":"create"},{"fieldName":"field_type"}]}},{"errorCode":{"assetLinkError":"UNSUPPORTED_FIELD_TYPE"},"message":"The
 
given field type is not supported to be added directly via asset 
links.","trigger":{"stringValue":"MARKETING_IMAGE"},"location":{"fieldPathElements":[{"fieldName":"operations","index":2},{"fieldName":"create"},{"fieldName":"field_type"}]}}],"requestId":"xaUKOsYsF9-tkFeomyp4-w"}

-- 
-- 
=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~
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 
"Google Ads API and AdWords 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/60b05117-e48c-4690-8c3b-b163230cd84cn%40googlegroups.com.
  • Ho... lezhne...@gmail.com
    • ... lezhne...@gmail.com
      • ... Dmitriy Lezhnev
        • ... Jan Jouke Tjalsma
          • ... 'Google Ads API Forum Advisor' via Google Ads API and AdWords API Forum

Reply via email to