Hi,

We're trying to automate the deployment of our ad campaigns through the 
API. 

In our current production enviroment we're using Feeds to populate our 
Dynamic HTML ads. However the documentation states that the Feed 
functionality will be depricated, so for our automation we're planning on 
using the Asset structure provided by google (
https://developers.google.com/google-ads/api/reference/rpc/v11/DynamicEducationAsset
).

After trying to upload a DYNAMIC HTML Bundle (same file as we use in our 
current production enviroment) through the api we get the response 
"MEDIA_BUNDLE_NOT_COMPATIBLE_TO_PRODUCT_TYPE".

Below I've added some logging in regards to our communication:

[2022-06-21T14:28:33.374061+00:00] google-ads.INFO: Request made: Host: 
"googleads.googleapis.com", Method: 
"/google.ads.googleads.v10.services.GoogleAdsService/SearchStream", 
CustomerId: [REDACTED_CUSTOMER_ID], RequestId: "0jQfXZ6Ru3ookzwyrQv87w", 
IsFault: 0, FaultMessage: "None"  
[2022-06-21T14:28:33.691047+00:00] google-ads.INFO: Request made: Host: 
"googleads.googleapis.com", Method: 
"/google.ads.googleads.v10.services.CampaignBudgetService/MutateCampaignBudgets",
 
CustomerId: [REDACTED_CUSTOMER_ID], RequestId: "vv29GMrxoN2h4ZWHre46vA", 
IsFault: 0, FaultMessage: "None"  
Added budget named 
'customers/[REDACTED_CUSTOMER_ID]/campaignBudgets/[REDACTED_CAMPAIGN_BUDGET_ID]'
[2022-06-21T14:28:33.992968+00:00] google-ads.INFO: Request made: Host: 
"googleads.googleapis.com", Method: 
"/google.ads.googleads.v10.services.CampaignService/MutateCampaigns", 
CustomerId: [REDACTED_CUSTOMER_ID], RequestId: "EK0e04Yq5j7Sev-_DFIu_Q", 
IsFault: 0, FaultMessage: "None"  
customers/[REDACTED_CUSTOMER_ID]/campaigns/[REDACTED_CAMPAIGN_ID]
[2022-06-21T14:28:34.332153+00:00] google-ads.INFO: Request made: Host: 
"googleads.googleapis.com", Method: 
"/google.ads.googleads.v10.services.AdGroupService/MutateAdGroups", 
CustomerId: [REDACTED_CUSTOMER_ID], RequestId: "xga_fzQRLu21W8hf0XESxA", 
IsFault: 0, FaultMessage: "None"  
Added 1 ad groups:
customers/[REDACTED_CUSTOMER_ID]/adGroups/[REDACTED_ADGROUP_ID]
[2022-06-21T14:28:34.747644+00:00] google-ads.WARNING: Request made: Host: 
"googleads.googleapis.com", Method: 
"/google.ads.googleads.v10.services.AssetService/MutateAssets", CustomerId: 
[REDACTED_CUSTOMER_ID], RequestId: "3KTyu7MGRqQFkM50z0U43g", IsFault: 1, 
FaultMessage: "["The media bundle is not compatible with the asset spec 
product type. (E.g. Gmail, dynamic remarketing, etc.)"]"  
[2022-06-21T14:28:34.747933+00:00] google-ads.NOTICE: Request
-------
Method Name: /google.ads.googleads.v10.services.AssetService/MutateAssets
Host: googleads.googleapis.com
Headers: {
    "x-goog-api-client": "gl-php\/8.0.18 gccl\/14.0.0 gapic\/14.0.0 
gax\/1.12.0 grpc\/1.42.0 rest\/1.12.0",
    "x-goog-request-params": "customer_id=[REDACTED_CUSTOMER_ID]",
    "developer-token": "REDACTED",
    "login-customer-id": "[REDACTED_MANAGER_ID]"
}
Request: 
{"customerId":"[REDACTED_CUSTOMER_ID]","operations":[{"create":{"name":"[REDACTED_CAMPAIGN_NAME]","type":"DYNAMIC_EDUCATION","mediaBundleAsset":{"data":"[REDACTED_ENCODED_HTML_CONTENT]"}}}]}

Response
-------
Headers: {
    "request-id": "3KTyu7MGRqQFkM50z0U43g",
    "date": "Tue, 21 Jun 2022 14:28:34 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":{"mediaUploadError":"MEDIA_BUNDLE_NOT_COMPATIBLE_TO_PRODUCT_TYPE"},"message":"The
 
media bundle is not compatible with the asset spec product type. (E.g. 
Gmail, dynamic remarketing, 
etc.)","location":{"fieldPathElements":[{"fieldName":"operations","index":0}]}}],"requestId":"3KTyu7MGRqQFkM50z0U43g"}
 
 

   Google\Ads\GoogleAds\Lib\V10\GoogleAdsException 

  {
    "message": "Request contains an invalid argument.",
    "code": 3,
    "status": "INVALID_ARGUMENT",
    "details": [
        {
            "@type": "google.ads.googleads.v10.errors.googleadsfailure-bin",
            "data": "<Unknown Binary Data>"
        },
        {
            "@type": "grpc-status-details-bin",
            "data": "<Unknown Binary Data>"
        },
        {
            "@type": "request-id",
            "data": "3KTyu7MGRqQFkM50z0U43g"
        }
    ]
}




-- 
-- 
=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~
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/09ac09e5-8397-4203-ba97-e039a8225e0bn%40googlegroups.com.
  • Au... S.A.
    • ... 'Google Ads API Forum Advisor' via Google Ads API and AdWords API Forum

Reply via email to